Ask Your Question

unable to build 2.4 w/ Java support on OSX

asked 2013-04-03 17:39:37 -0500

jzeimen gravatar image

I am trying to follow the guide here:

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

git clone git://
cd opencv
git checkout 2.4
mkdir build
cd build

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.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-04-06 14:38:23 -0500

jzeimen gravatar image

There was a pull request on github that fixed this issue for me. It appears to have been committed to the main repo. So it should be resolved.

edit flag offensive delete link more

Question Tools


Asked: 2013-04-03 17:39:37 -0500

Seen: 132 times

Last updated: Apr 06 '13