私はここで見つけることができるプロジェクトのためにGist記述子のLearの実装を使用しています:http://lear.inrialpes.fr/software。
私はC++でアプリケーションを書いていますが、このライブラリを使用したいと思います。makefileとリンク全般に問題があります。
これらのコマンドではエラーは発生しません。
g++ -c standalone_image.c -o standalone_image.o
g++ -c gist.c -o gist.o
ただし、この行
g++ compute_gist.c `pkg-config --cflags --libs opencv`
次のエラーが発生します
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
別のディレクトリにMosaicc++コードがあります。また、gistとstandalone_imageを別々にコンパイルし、mosaicディレクトリにコピーして、Mosaicコードをコンパイルしようとしました。これにより、次のエラーが発生します。
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
このライブラリをプロジェクトで本当に使用したいのですが、c++に組み込む方法がわかりません。
どんな助けでも大歓迎です!ありがとう!
編集:私はMacLionを次のように使用しています:
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)
リアライブラリは、CおよびC++で動作するFFTW3ライブラリも使用します。