Strange compilation problem

asked 2014-03-07 11:42:55 -0500

Polyquin gravatar image

Hi all,

I've compiled opencv 2.4.8 but getting errors like this. The lib and include directories are found in the Makefile. Stumped!

Mac-mini:imagedetection tas5$
./imagedetection  dyld: Library not loaded: lib/libopencv_core.2.4.dylib  
Referenced from:
/Users/tas5/working/opencv_projs/imagedetection/./imagedetection   Reason: image not found Trace/BPT
trap: 5


CC = g++ 
LDFLAGS = -I/Users/tas5/local/tbb42/include -I/Users/tas5/local/include -I/Users/tas5/local/include/opencv -I/Users/tas5/local/include/opencv2 -I/Users/tas5/local/include/opencv2/core -L/Users/tas5/local/lib -lm -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_objdetect

ALL = imagedetection all: $(ALL)

imagedetection: imagedetection.o
          $(CC) $(LDFLAGS) -o $@ $^

imagedetection.o: imagedetection.cpp
         $(CC) $(LDFLAGS) -c $<

.PHONY: clean

         rm -rf *.o core* $(ALL)
edit retag flag offensive close merge delete