Lear Gist descriptor code used with C ++

I am using the Project Gist Descriptor List implementation which can be found here: http://lear.inrialpes.fr/software .

I am writing an application in C ++ and I want to use this library. I'm having problems though with the makefile and the link in general.

These commands don't give me errors:

g++ -c standalone_image.c -o standalone_image.o
g++ -c gist.c -o gist.o

      

However, this line

g++ compute_gist.c `pkg-config --cflags --libs opencv`

      

gives me error

Undefined symbols for architecture x86_64:
  "color_gist_scaletab(color_image_t*, int, int, int const*)", referenced from:
      _main in ccMFYbAU.o
  "color_image_delete(color_image_t*)", referenced from:
      _main in ccMFYbAU.o
  "color_image_new(int, int)", referenced from:
      load_ppm(char const*)in ccMFYbAU.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

      

I have a C ++ mosaic code in a different directory. I also tried to compile the gist and standalone_image separately, copy to the mosaic directory, and compile the Mosaic code. Which gives me the following error:

Undefined symbols for architecture x86_64:
  "color_gist_scaletab(color_image_t*, int, int, int const*)", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [mosaic] Error 1

      

I really want to use this library in my project, but I cannot figure out how to include it in my C ++.

Any help is greatly appreciated! Thank!

Edit: I am using Mac Lion with:

gcc + g++ version: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)

      

The lear library also uses the FFTW3 library, which should work with C and C ++.

+3


source to share


1 answer


The problem was that I needed an external interface around the gist include, but the link that was made in the Makefile was also wrong. He is working now.:)



0


source







All Articles