0
私はXCode 4で開発しており、OpenCVライブラリをリンクしていくつかの実験プロジェクトを作成しました。OpenCV cvSmoothリンカエラー
int main (int argc, const char * argv[])
{
IplImage* img = cvLoadImage(argv[1]);
cvNamedWindow("Example3-in");
cvNamedWindow("Example3-out");
// Show the original image
cvShowImage("Example3-in", img);
// Create an image for the output
IplImage* out = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 3);
// Perform a Gaussian blur
cvSmooth(img, out, CV_GAUSSIAN, 11, 11);
// Show the processed image
cvShowImage("Example3-out", out);
cvWaitKey(0);
cvReleaseImage(&img);
cvReleaseImage(&out);
cvDestroyWindow("Example3-in");
cvDestroyWindow("Example3-out");
return 0;
}
問題:このラインコンパイルしようと
発見した場合は問題私の意見で
Undefined symbols for architecture x86_64:
"_cvSmooth", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
は、64ビットアーキテクチャ用にコンパイルされていないライブラリのようなものですが...
注:
ライブラリは、MacPorts
アーキテクチャーi386の未定義のシンボルで、64ビットアーキテクチャー(iMac)のMacPorts経由でインストールされたと思います。 –