Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

unable to build 2.4 w/ Java support on OSX

I am trying to follow the guide here: http://docs.opencv.org/2.4.4-beta/doc/tutorials/introduction/desktop_java/java_dev_intro.html

I can follow the instructions exactly I type these exact commands into a command window:

git clone git://github.com/Itseez/opencv.git
cd opencv
git checkout 2.4
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=OFF ..
make

It will get about 80 percent done then offer this error:

[ 86%] Building CXX object modules/java/CMakeFiles/opencv_java.dir/contrib.cpp.o
Linking CXX shared library ../../lib/libopencv_java244.dylib
ld: unknown option: -whole-archive
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Anyone know how to fix this or is it just a bug. If i instead clone to 2.4.3 and manually enable java it appears to work... This is my first project trying to use the library so I'm not exactly sure what to expect.