symbol(s) not found for architecture x86_64 os x lion

◇◆丶佛笑我妖孽 提交于 2019-12-05 14:31:37
Gnosophilon

This looks like you are not linking against the library correctly. There are at least two similar questions on stackoverflow that deal with this issue, namely this one and that one. Did you take a look at them? Furthermore, please supply more information about how you are compiling. Can you compile a simple OpenCV test program such as this one (taken from their wiki):

#include <cv.h>
#include <highgui.h>

int main ( int argc, char **argv )
{
  cvNamedWindow( "My Window", 1 );
  IplImage *img = cvCreateImage( cvSize( 640, 480 ), IPL_DEPTH_8U, 1 );
  CvFont font;
  double hScale = 1.0;
  double vScale = 1.0;
  int lineWidth = 1;
  cvInitFont( &font, CV_FONT_HERSHEY_SIMPLEX | CV_FONT_ITALIC,
              hScale, vScale, 0, lineWidth );
  cvPutText( img, "Hello World!", cvPoint( 200, 400 ), &font,
             cvScalar( 255, 255, 0 ) );
  cvShowImage( "My Window", img );
  cvWaitKey();
  return 0;
}

I generated this error when I accidentally combined separate target_link_libraries() in my CMakeLists.txt file when compiling with cmake.

Specifically, I took the correct:

target_link_libraries(
GradientComputer
)

target_link_libraries(
Overlap
PointAreaComputer
)

and combined them to create the incorrect:

target_link_libraries(
GradientComputer
Overlap
PointAreaComputer
)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!