我在Windows 7 64位上使用Eclipse CDT并尝试使用Image Magick处理Image Class但我收到以下错误 -
#pragma warning(once: 4459) /* 'identifier' : declaration of 'foo' hides global declaration */
g++ "-LC:\\Development\\ImageMagick-7.0.3-Q16\\lib" "- LC:\\Development\\opencv\\MINGW\\x86\\bin" -o testOpencv.exe "src\\testOpencv.o" -llibopencv_features2d2410 -lCORE_RL_Magick++_ -lCORE_RL_MagickCore_ - lCORE_RL_MagickWand_ -llibopencv_objdetect2410 -llibopencv_contrib2410 - llibopencv_core2410 -llibopencv_flann2410 -llibopencv_gpu2410 - llibopencv_highgui2410 -llibopencv_imgproc2410 -llibopencv_ml2410 - llibopencv_legacy2410 -llibopencv_nonfree2410 -llibopencv_objdetect2410 - llibopencv_ocl2410 -llibopencv_photo2410 -llibopencv_stitching2410 - llibopencv_superres2410 -llibopencv_video2410 -llibopencv_videostab2410 - lopencv_ffmpeg2410 -llibopencv_ml2410
src\testOpencv.o: In function `main':
C:\Development\Workspace\testOpencv\Debug/../src/testOpencv.cpp:14: undefined reference to `Magick::Image::Image()'
C:\Development\Workspace\testOpencv\Debug/../src/testOpencv.cpp:15: undefined reference to `Magick::Image::read(std::string const&)'
C:\Development\Workspace\testOpencv\Debug/../src/testOpencv.cpp:16: undefined reference to `Magick::Image::display()'
C:\Development\Workspace\testOpencv\Debug/../src/testOpencv.cpp:16: undefined reference to `Magick::Image::~Image()'
C:\Development\Workspace\testOpencv\Debug/../src/testOpencv.cpp:16: undefined reference to `Magick::Image::~Image()'
collect2.exe: error: ld returned 1 exit status
14:28:39 Build Finished (took 847ms)
我在Eclipse中的链接器中添加了包含文件到编译器和库文件。 Image magick安装文件夹中的库文件对我来说很奇怪,因为它们不是'.dll'文件。如果我是对的,请告诉我,我该如何纠正这一点。