Ask Your Question
0

compiling on osx

asked 2013-10-02 06:30:23 -0600

Antonio C. gravatar image

i'm experiencing some errors compiling opencv 2.4.6.1 on osx mountain lion:

/Users/stanzarossa/Downloads/opencv-2.4.6.1/modules/legacy/src/dpstereo.cpp:164:19: error: multiple unsequenced modifications to 'temp3' [-Werror,-Wunsequenced] if( ( CV_IMAX3( srcdata1[j-3], srcdata1[j-2], srcdata1[j-1] ) - ^ /Users/stanzarossa/Downloads/opencv-2.4.6.1/modules/legacy/src/dpstereo.cpp:79:33: note: expanded from macro 'CV_IMAX3'

define CV_IMAX3(a,b,c) ((temp3 = (a) >= (b) ? (a) : (b)),(temp3 >= (c) ? temp3 : (c)))

                            ^

/Users/stanzarossa/Downloads/opencv-2.4.6.1/modules/legacy/src/dpstereo.cpp:169:19: error: multiple unsequenced modifications to 'temp3' [-Werror,-Wunsequenced] if( ( CV_IMAX3( srcdata2[j+3], srcdata2[j+2], srcdata2[j+1] ) - ^ /Users/stanzarossa/Downloads/opencv-2.4.6.1/modules/legacy/src/dpstereo.cpp:79:33: note: expanded from macro 'CV_IMAX3'

define CV_IMAX3(a,b,c) ((temp3 = (a) >= (b) ? (a) : (b)),(temp3 >= (c) ? temp3 : (c)))

                            ^

/Users/stanzarossa/Downloads/opencv-2.4.6.1/modules/legacy/src/dpstereo.cpp:322:19: error: multiple unsequenced modifications to 'temp3' [-Werror,-Wunsequenced] if( ( CV_IMAX3( src1[(y-1)widthStep+x], src1[ywidthStep+x], ^ /Users/stanzarossa/Downloads/opencv-2.4.6.1/modules/legacy/src/dpstereo.cpp:79:33: note: expanded from macro 'CV_IMAX3'

define CV_IMAX3(a,b,c) ((temp3 = (a) >= (b) ? (a) : (b)),(temp3 >= (c) ? temp3 : (c)))

                            ^

3 errors generated. make[2]: * [modules/legacy/CMakeFiles/opencv_legacy.dir/src/dpstereo.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... [ 47%] Building CXX object modules/ocl/CMakeFiles/opencv_ocl.dir/kernels.cpp.o [ 47%] Building CXX object modules/contrib/CMakeFiles/opencv_contrib.dir/src/spinimages.cpp.o [ 47%] Building CXX object modules/contrib/CMakeFiles/opencv_contrib.dir/src/stereovar.cpp.o make[1]: [modules/legacy/CMakeFiles/opencv_legacy.dir/all] Error 2 [ 47%] Building CXX object modules/imgproc/CMakeFiles/opencv_test_imgproc.dir/test/test_thresh.cpp.o [ 47%] Building CXX object modules/imgproc/CMakeFiles/opencv_test_imgproc.dir/test/test_watershed.cpp.o Linking CXX shared library ../../lib/libopencv_ocl.dylib [ 47%] Built target opencv_ocl Linking CXX shared library ../../lib/libopencv_contrib.dylib [ 47%] Built target opencv_contrib Linking CXX executable ../../bin/opencv_test_imgproc [ 47%] Built target opencv_test_imgproc make: * [all] Error 2

this is the output of the cmake command, some tips?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-10-02 21:18:02 -0600

gbabic gravatar image

updated 2013-10-02 21:19:12 -0600

Hi Antonio,

I have just jumped into OpenCV myself and am currently working on an ios project. I had some issues that were resolved by using the gnu compiler instead of the apple default.

An easy way to compile and install openCV on mac is with homebrew: (http://brew.sh) to install it just throw this into your terminal: ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

then when homebrew is installed run the next few one by one:

brew doctor

brew tap homebrew/science

brew intall opencv

brew should install all dependencies for you etc...

hope that helps you.

edit flag offensive delete link more

Comments

i've done it but it seems that homebrew doesn't install the *.dylib files....

Antonio C. gravatar imageAntonio C. ( 2013-10-04 06:05:26 -0600 )edit

"brew intall opencv" should be "brew install opencv" with an 's' in install

DB3s gravatar imageDB3s ( 2014-04-03 20:16:46 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-10-02 06:30:23 -0600

Seen: 1,438 times

Last updated: Oct 02 '13