When I try to compile a simple C ++ code test.cpp with opencv 2.3.1 as the third, I get the following error message:
Undefined characters for x86_64 architecture:
"_cvLoadImage" referenced: _main in test.cpp.old: character not found for x86_64 architecture
For information, I use CMake for communication, and gcc 4.2.1 i686-apple-darwin11 obtained from Xcode 4.2. OpenCV was installed using CMake:
ccmake ../ sourcecode
Please note that I get a similar message when I try to compile SoQt (coin3D), after the commands. / configure and sudo make:
. ,,
"typeinfo for QWidget" referenced: typeinfo for SoQtThumbWheelin SoQtThumbWheel.o "QWidget :: staticMetaObject" referenced: SoQtThumbWheel :: staticMetaObject in SoQtThumbWheel.old: characters (characters) x86 not found for 1 exit status
CMakeLists.txt of the main project:
cmake_minimum_required(VERSION 2.8) PROJECT(TOTO ) FIND_PACKAGE(OpenCV) INCLUDE_DIRECTORIES(${TOTO_SOURCE_DIR}/src/control) SET(ALL_LIB_RAF ${OPENCV_LIBRARIES} Hello )
Whereas CMakeLists.txt for test.cpp:
ADD_EXECUTABLE(helloWorld test) TARGET_LINK_LIBRARIES(helloWorld ${ALL_LIB_RAF} )
Perhaps the problem is that OpenCV needs to be compiled into 64-bit (?). I found an interesting link. But I wonder how these sights apply to CMake.
Any help please?
Thanks.
source share