I'm trying to modify VLFeat source code in particular the function vl_vlad_code
in this file. Now, since it is the first time that I edit the source code of such a library, I started with something simple, like printing an Hello World! at the beginning of the fucntion:
void
vl_vlad_encode (void * enc, vl_type dataType,
void const * means, vl_size dimension, vl_size numClusters,
void const * data, vl_size numData,
void const * assignments,
int flags)
{
printf("Hello World!");
...
Then (following this document convention):
- I removed the binary code with
rm -rf VLFEATROOT/bin
- I recompiled the library with
make
inVLFEATROOT
(with no errors)
However, when I call vl_vlad_code
from my application nothing is printed. Notice that the library works fine in my C++ application, it just "ignores" my changes.
Just for completeness, I use Ubuntu 16.04 and this are the compiling options regarding VLFeat that I use in my Eclipse CDT project:
... -I/home/luca/vlfeat ... -L/home/luca/vlfeat/bin/glnxa64 ... -lvl
UPDATE: Following suggestions in the comments, I tried to write something to a file in this way:
void
vl_vlad_encode (void * enc, vl_type dataType,
void const * means, vl_size dimension, vl_size numClusters,
void const * data, vl_size numData,
void const * assignments,
int flags)
{
FILE *f = fopen("/home/luca/file.txt", "w");
if (f == NULL)
{
printf("Error opening file!\n");
exit(1);
}
/* print some text */
const char *text = "Write this to the file";
fprintf(f, "Some text: %s\n", text);
And no file is created!