Solving some "Symbol not found" problems for libJPEG, libTIFF, libGL, libPng

Robert Baruch robert.c.baruch at gmail.com
Fri Nov 19 08:00:43 PST 2010


On Nov 18, 2010, at 6:30 PM, Ryan Schmidt wrote:

>> #include “highgui.h”
>> 
>> int main( int argc, char** argv ) {
>>  IplImage* img = cvLoadImage( argv[1] );
>>  cvNamedWindow( “Example1”, CV_WINDOW_AUTOSIZE );
>>  cvShowImage( “Example1”, img );
>>  cvWaitKey(0);
>>  cvReleaseImage( &img );
>>  cvDestroyWindow( “Example1” );
>> }
> 
> With opencv @2.1.0_0 installed, I tried compiling your sample program by pasting it into a new test.c text file and running:
> 
> gcc test.c -I/opt/local/include/opencv -L/opt/local/lib -lcxcore -lhighgui
> 

I saved it as main.cpp, and then I compiled it this way (via NetBeans, so I'm removing all the different directories and just showing the filenames):

g++    -c -g -I/opt/local/include/opencv -MMD -MP -MF main.o.d -o main.o main.cpp
g++     -o main main.o -L/opt/local/lib -lcv -lcvaux -lcxcore -lhighgui -lml 




More information about the macports-users mailing list