Giter Club home page Giter Club logo

Comments (13)

kyamagu avatar kyamagu commented on July 18, 2024

What is the error message? What is the version of opencv? Do other files compile? Do you already apply a patch for mex?

http://www.mathworks.com/support/solutions/en/data/1-FR6LXJ/

from mexopencv.

rectoyon avatar rectoyon commented on July 18, 2024

I'm using the trunk out of github. Should I stick with 2.4.3?

Here is the full error:

Richards-MacBook-Pro:mexopencv rcagley$ make MATLABDIR=/Applications/MATLAB_R2012b.app
/Applications/MATLAB_R2012b.app/bin/mex -cxx -largeArrayDims -Iinclude -I/usr/local/include/opencv -I/usr/local/include   src/+cv/private/EM_.cpp -lMxArray -Llib /usr/local/lib/libopencv_calib3d.dylib /usr/local/lib/libopencv_contrib.dylib /usr/local/lib/libopencv_core.dylib /usr/local/lib/libopencv_features2d.dylib /usr/local/lib/libopencv_flann.dylib /usr/local/lib/libopencv_gpu.dylib /usr/local/lib/libopencv_highgui.dylib /usr/local/lib/libopencv_imgproc.dylib /usr/local/lib/libopencv_legacy.dylib /usr/local/lib/libopencv_ml.dylib /usr/local/lib/libopencv_nonfree.dylib /usr/local/lib/libopencv_objdetect.dylib /usr/local/lib/libopencv_ocl.dylib /usr/local/lib/libopencv_photo.dylib /usr/local/lib/libopencv_softcascade.dylib /usr/local/lib/libopencv_stitching.dylib /usr/local/lib/libopencv_ts.dylib /usr/local/lib/libopencv_video.dylib /usr/local/lib/libopencv_videostab.dylib   -o +cv/private/EM_.mexmaci64
src/+cv/private/EM_.cpp: 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>]’:
src/+cv/private/EM_.cpp:208:   instantiated from here
src/+cv/private/EM_.cpp:208: 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
src/+cv/private/EM_.cpp: 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>]’:
src/+cv/private/EM_.cpp:208:   instantiated from here
src/+cv/private/EM_.cpp:208: 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
src/+cv/private/EM_.cpp: 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>]’:
src/+cv/private/EM_.cpp:208:   instantiated from here
src/+cv/private/EM_.cpp:208: 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
src/+cv/private/EM_.cpp: 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>]’:
src/+cv/private/EM_.cpp:208:   instantiated from here
src/+cv/private/EM_.cpp:208: 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/+cv/private/EM_.cpp"' failed.

make: *** [+cv/private/EM_.mexmaci64] Error 1

from mexopencv.

kyamagu avatar kyamagu commented on July 18, 2024

Seems like a compiler issue, as I have no problem in Matlab R2011a in OS X 10.8.2 + Xcode 4.6 + mathworks patch with OpenCV 2.4.3 from macports. If you can't figure out the issue, the temporary solution is just to comment out the error handling block around 'src/+cv/private/EM_.cpp: 208'.

from mexopencv.

rectoyon avatar rectoyon commented on July 18, 2024

you used this patch yeah?
optsPatch_MACOSX8.patch

from mexopencv.

kyamagu avatar kyamagu commented on July 18, 2024

Yes, that patch.

from mexopencv.

rectoyon avatar rectoyon commented on July 18, 2024

Well, I'm stumped but I'm not sure it matters that much. Commented out lines 208 and 223...everything else built fine.
Thanks for the help.

from mexopencv.

rectoyon avatar rectoyon commented on July 18, 2024

BTW, this is really great work. Super useful.

from mexopencv.

kyamagu avatar kyamagu commented on July 18, 2024

Alright, the problematic block is rewritten in the latest commit.

from mexopencv.

gotardop avatar gotardop commented on July 18, 2024

I had a similar problem. In my case I had to edit my mexopts.sh file and change the following line:

MACOSX_DEPLOYMENT_TARGET='10.5'
to
MACOSX_DEPLOYMENT_TARGET='10.7'

from mexopencv.

mgerlach1 avatar mgerlach1 commented on July 18, 2024

I still have the same issue. The suggested solutions do not work for me. I use Xcode 4.6.2 (with command line tools) and that patch and Matlab 2012b. Opencv version 2.4.5.

from mexopencv.

kyamagu avatar kyamagu commented on July 18, 2024

@mgerlach1 The latest commit removed suspicious part. Please post your error message if you still have a problem.

from mexopencv.

mgerlach1 avatar mgerlach1 commented on July 18, 2024

Now it works, great! Thanks.

from mexopencv.

HiDiYANG avatar HiDiYANG commented on July 18, 2024

Actually, this problem could be simply solved by changing the MACOSX_DEPLOYMENT_TARGET='10.5' to '10.6' in mexopts.sh.

from mexopencv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.