First of all, I grab the patch from the following link to connect Matlab mex with Xcode,
https://www.mathworks.com/support/solutions/en/data/1-FR6LXJ/
Second, I modify the MACOSX_DEPLOYMENT_TARGET=10.5 into 10.6 or higher.
After these steps, you should be able to compile and enjoy the mexopencv.
PS: website of mexopencv, (many thanks to kota)
http://www.cs.sunysb.edu/~kyamagu/mexopencv/
/Applications/MATLAB_R2012a.app/bin/mex -c -cxx -largeArrayDims -Iinclude -I/opt/local/include/opencv -I/opt/local/include src/MxArray.cpp -outdir lib
/opt/local/include/opencv2/flann/params.h: In instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]':
/opt/local/include/opencv2/flann/params.h:87: instantiated from here
/opt/local/include/opencv2/flann/params.h:87: error: explicit instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' but no definition available
/opt/local/include/opencv2/flann/params.h: In instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]':
/opt/local/include/opencv2/flann/params.h:87: instantiated from here
/opt/local/include/opencv2/flann/params.h:87: error: explicit instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' but no definition available
/opt/local/include/opencv2/flann/params.h: In instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]':
/opt/local/include/opencv2/flann/params.h:87: instantiated from here
/opt/local/include/opencv2/flann/params.h:87: error: explicit instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' but no definition available
/opt/local/include/opencv2/flann/params.h: In instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]':
/opt/local/include/opencv2/flann/params.h:87: instantiated from here
/opt/local/include/opencv2/flann/params.h:87: error: explicit instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' but no definition available
/opt/local/include/opencv2/flann/params.h: In instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]':
/opt/local/include/opencv2/flann/params.h:87: instantiated from here
/opt/local/include/opencv2/flann/params.h:87: error: explicit instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' but no definition available
mex: compile of ' "src/MxArray.cpp"' failed.
make: *** [lib/libMxArray.a] Error 1
Hi, I did what you said, I modified the the MACOSX_DEPLOYMENT_TARGET =10.5 into 10.6 in mexopts.ch.But it still does't work. This kind of problem still exsits.
ReplyDeleteusr/include/opencv2/flann/params.h: In instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator]':
Could you help me, where to do change the the MACOSX_DEPLOYMENT_TARGET. Thanks a lot!!!!!
what's ur system information?
DeleteCasino City - Dr. Majestic Casino & Hotel
ReplyDeleteDr. Majestic Casino 여수 출장마사지 & Hotel is a luxury hotel and casino located 전라남도 출장마사지 in the heart of Las 광양 출장마사지 Vegas. It is adjacent 시흥 출장샵 to the Miracle Mile Casino 광명 출장샵 and Casino.