i've been trying to compile my code with openCV on mac 64bit. The following is my makefile contents:
OSTYPE := $(shell uname -s)
SRC_FILES = \
../RGB_display/main.cpp
INC_DIRS += ../RGB_display
EXE_NAME = RGB_display
DEFINES = USE_GLUT
#opencv libraries
###################
CC = g++
DEBUG_LEVEL = -m64 -g3 -O0
CFLAGS = -O3 -I/opt/local/include/opencv -L/opt/local/lib/
LIBS = -lhighgui -lcvaux -lcv -lml -lcxcore
.SUFFIXES: .o .cc
LDFlags = `pkg-config --libs opencv` -opencv_imgproc
####################
#end add
ifeq ("$(OSTYPE)","Darwin")
LDFLAGS += -framework OpenGL -framework GLUT
else
USED_LIBS += glut
endif
include ../NiteSampleMakefile
However I get the following error:
ld: symbol(s) not found for architecture x86开发者_Go百科_64
Does anybody know why this is happening? I know its with regards to my mac being on a 64 bit system, but I have tried adding DEBUG_LEVEL = -m64 and it still doesn't work.
Are you sure that you installed 64-bit OpenCV libraries? (Or Universal Binaries) That should be your problem.
Using the "file" command on your OpenCV libraries should tell you what architectures they provide.
精彩评论