Ask Your Question

OS X Mavericks/ OpenCV Issues

asked 2013-10-27 20:03:08 -0600

cje0113 gravatar image

updated 2013-12-03 14:47:25 -0600

jensenb gravatar image

After updating to Mac OS X Mavericks, I am having issues running OpenCV. I was able to run the DisplayImage tutorial before updating, but cannot afterwards. I have updated Xcode and installed the new Command Line Tools.

I am able to compile and run a simple Hello World.cpp program, but when attempting to do the basic Display Image tutorial, I receive these errors:

symbol(s) not found for architecture x86_64 make: * [DisplayImage] Error 1

Anyone else have these problems or have a solution?

Thank you!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-12-03 14:46:40 -0600

jensenb gravatar image

This is not a runtime error build a build error, and given that you upgrade to Mavericks it indicates you have mixed libraries that were linked against libstdc++ and libc++. Recompiling OpenCV and its dependencies with the update developer tools should solve the issue.

edit flag offensive delete link more


@jensenb gives a correct answer to this problem. May I ask how to specify using libstdc++ or libc++ ? I use CMake-gui to configure the OpenCV and "make" to build it. Any flag in CMake ? or I should do something when I "make" it ? Thanks.

maythe4thbewithu gravatar imagemaythe4thbewithu ( 2013-12-19 10:01:17 -0600 )edit

You can add the value "-stdlib=libc++" to the CMake variable "CXXFLAGS" to use libc++, and "-stdlib=libstdc++" to use GNU libstdc++.

jensenb gravatar imagejensenb ( 2013-12-19 11:57:03 -0600 )edit

Question Tools


Asked: 2013-10-27 20:03:08 -0600

Seen: 838 times

Last updated: Dec 03 '13