Ask Your Question
2

OpenCV compilation issues on Mac OSX Mavericks

asked 2013-11-29 07:10:28 -0600

skooth gravatar image

Hi,

I updated my computer and now OpenCV is no longer working on my OSX Mavericks.

I have a C++ algorithm, a CMakesList.txt and a picture on the folder. So, on the terminal I just navigate to the folder, type cmake . and then make, resulting on the following message:

Undefined symbols for architecture x86_64:
  "cv::imread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int)", referenced from:
      _main in histogramcomp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [histogramcomp] Error 1
make[1]: *** [CMakeFiles/histogramcomp.dir/all] Error 2
make: *** [all] Error 2

I really tried a lot of things! I was using Homebrew, then updated but it didn't work, so uninstall everything and started with macports, but after everything installed it still didn't work!

What should I do to have this finally working?

Thank you!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-12-02 05:14:06 -0600

skooth gravatar image

updated 2013-12-02 05:14:58 -0600

Hi,

I finally solve the problem yesterday after several tentatives. I installed homebrew, Cmake 64bits and OpenCV 2.4.7. After solving some linking problems, it worked again. :)

Hope it helps who is facing the same problem.

edit flag offensive delete link more

Comments

I would add that your error above indicates you were mixing libc++ and libstc++ code. Recompiling OpenCV as well as all it dependencies is likely what solved your issue, since they would use libc++ by default on Mavericks.

jensenb gravatar imagejensenb ( 2013-12-03 14:08:02 -0600 )edit

Question Tools

Stats

Asked: 2013-11-29 07:10:28 -0600

Seen: 621 times

Last updated: Dec 02 '13