Comments (10)
Are you using win32? Is you path pointing to 32-bit dll?
from mexopencv.
Do you mean In visual studio? Yes the configuration is Win32.
from mexopencv.
I mean, do you have your 'Path' pointing to somewhere like this?
c:\opencv\build\x86\vs9\bin
Also if you build opencv from source you need to change cv.make script so that all paths are appropriately pointing to the freshly built binaries.
from mexopencv.
Yes it does point to 'c:\opencv\build\x86\vc9\bin' folder and i do replace the dll files after i get them compiled by vs2008. I've tested it now with vs2010 and it is even worse, i do not get it compiled with vs2010 at all. I get linker errors as given below:
>> cv.make
mex -largeArrayDims -D_SECURE_SCL=1 -Iinclude -I"C:\opencv\build\include" -L"C:\opencv\build\x86\vc10\lib" -lopencv_calib3d241 -lopencv_contrib241 -lopencv_core241 -lopencv_features2d241 -lopencv_flann241 -lopencv_gpu241 -lopencv_haartraining_engine -lopencv_highgui241 -lopencv_imgproc241 -lopencv_legacy241 -lopencv_ml241 -lopencv_nonfree241 -lopencv_objdetect241 -lopencv_photo241 -lopencv_stitching241 -lopencv_ts241 -lopencv_video241 -lopencv_videostab241 src\+cv\CamShift.cpp lib\MxArray.obj -output +cv\CamShift
Creating library C:\USERS\FRONDEUR\APPDATA\LOCAL\TEMP\MEX_B4~1\templib.x and object C:\USERS\FRONDEUR\APPDATA\LOCAL\TEMP\MEX_B4~1\templib.exp
MxArray.obj : warning LNK4217: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported in function "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
MxArray.obj : warning LNK4217: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported in function "public: virtual __thiscall std::logic_error::~logic_error(void)" (??1logic_error@std@@UAE@XZ)
MxArray.obj : warning LNK4217: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall MxArray::toString(void)const " (?toString@MxArray@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
MxArray.obj : warning LNK4217: locally defined symbol ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z (bool __cdecl std::operator<<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported in function "public: bool __thiscall std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::operator()(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " (??R?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@std@@QBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@0@Z)
MxArray.obj : warning LNK4217: locally defined symbol ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z (bool __cdecl std::operator==<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)) imported in function "public: class cv::Range __thiscall MxArray::toRange(void)const " (?toRange@MxArray@@QBE?AVRange@cv@@XZ)
MxArray.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator=(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z) referenced in function "void __cdecl std::_Fill<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$_Fill@PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@YAXPAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0ABV10@@Z)
MxArray.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::swap(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (__imp_?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXAAV12@@Z) referenced in function "void __cdecl std::swap<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (??$swap@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z)
MxArray.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > * __cdecl std::_Uninit_move<class std::_Vector_iterator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >(class std::_Vector_iterator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >,class std::_Vector_iterator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > &,struct std::_Swap_move_tag,struct std::_Range_checked_iterator_tag)" (??$_Uninit_move@V?$_Vector_iterator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@YAPAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@V?$_Vector_iterator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@0@0PAV10@AAV?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@0@U_Swap_move_tag@0@U_Range_checked_iterator_tag@0@@Z)
F:\BIO-FLY\MEXOPE~1\_CV~1\CamShift.mexw32 : fatal error LNK1120: 3 unresolved externals
F:\MATLAB~1\BIN\MEX.PL: Error: Link of 'F:\BIO-FLY\MEXOPE~1\_CV~1\CamShift.mexw32' failed.
Error using mex (line 206)
Unable to complete successfully.
Error in cv.make (line 65)
eval(cmd);
from mexopencv.
Looks like you have a non-standard definition of primitive types
(char, byte, ...). Where do you get stdint.h?
Kota
On Jun 15, 2012, at 8:48, rafid
[email protected]
wrote:
Yes it does point to 'c:\opencv\build\x86\vc9\bin' folder and i do replace the dll files after i get them compiled by vs2008. I've tested it now with vs2010 and it is even worse, i do not get it compiled with vs2010 at all. I get linker errors as given below:
cv.make
mex -largeArrayDims -D_SECURE_SCL=1 -Iinclude -I"C:\opencv\build\include" -L"C:\opencv\build\x86\vc10\lib" -lopencv_calib3d241 -lopencv_contrib241 -lopencv_core241 -lopencv_features2d241 -lopencv_flann241 -lopencv_gpu241 -lopencv_haartraining_engine -lopencv_highgui241 -lopencv_imgproc241 -lopencv_legacy241 -lopencv_ml241 -lopencv_nonfree241 -lopencv_objdetect241 -lopencv_photo241 -lopencv_stitching241 -lopencv_ts241 -lopencv_video241 -lopencv_videostab241 src+cv\CamShift.cpp lib\MxArray.obj -output +cv\CamShift
Creating library C:\USERS\FRONDEUR\APPDATA\LOCAL\TEMP\MEX_B41\templib.x and object C:\USERS\FRONDEUR\APPDATA\LOCAL\TEMP\MEX_B41\templib.exp
MxArray.obj : warning LNK4217: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@QAE@ABV01@@z (public: __thiscall std::basic_string<char,struct std::char_traits,class std::allocator >::basic_string<char,struct std::char_traits,class std::allocator >(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)) imported in function "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@1@@z)
MxArray.obj : warning LNK4217: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits,class std::allocator >::basic_string<char,struct std::char_traits,class std::allocator >(void)) imported in function "public: virtual __thiscall std::logic_error::1\CamShift.mexw32 : fatal error LNK1120: 3 unresolved externalslogic_error(void)" (??1logic_error@std@@UAE@XZ)1_CV
MxArray.obj : warning LNK4217: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits,class std::allocator >::basic_string<char,struct std::char_traits,class std::allocator >(char const *)) imported in function "public: class std::basic_string<char,struct std::char_traits,class std::allocator > __thiscall MxArray::toString(void)const " (?toString@MxArray@@qbe?AV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@xz)
MxArray.obj : warning LNK4217: locally defined symbol ??$?MDU?$char_traits@D@std@@v?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@0@0@Z (bool __cdecl std::operator<<char,struct std::char_traits,class std::allocator >(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &)) imported in function "public: bool __thiscall std::less<class std::basic_string<char,struct std::char_traits,class std::allocator > >::operator()(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &)const " (??R?$less@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@std@@QBE_NABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@1@0@Z)
MxArray.obj : warning LNK4217: locally defined symbol ??$?8DU?$char_traits@D@std@@v?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@0@PBD@Z (bool __cdecl std::operator==<char,struct std::char_traits,class std::allocator >(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,char const *)) imported in function "public: class cv::Range __thiscall MxArray::toRange(void)const " (?toRange@MxArray@@qbe?AVRange@cv@@xz)
MxArray.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits,class std::allocator > & __thiscall std::basic_string<char,struct std::char_traits,class std::allocator >::operator=(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (_imp??4?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@QAEAAV01@ABV01@@z) referenced in function "void __cdecl std::_Fill<class std::basic_string<char,struct std::char_traits,class std::allocator > *,class std::basic_string<char,struct std::char_traits,class std::allocator > >(class std::basic_string<char,struct std::char_traits,class std::allocator > *,class std::basic_string<char,struct std::char_traits,class std::allocator > *,class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (??$_Fill@PAV?$
basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v12@@std@@YAXPAV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@0@0ABV10@@z)
MxArray.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::basic_string<char,struct std::char_traits,class std::allocator >::swap(class std::basic_string<char,struct std::char_traits,class std::allocator > &)" (_imp?swap@?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@QAEXAAV12@@z) referenced in function "void __cdecl std::swap<char,struct std::char_traits,class std::allocator >(class std::basic_string<char,struct std::char_traits,class std::allocator > &,class std::basic_string<char,struct std::char_traits,class std::allocator > &)" (??$swap@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@YAXAAV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@0@0@Z)
MxArray.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits,class std::allocator >::basic_string<char,struct std::char_traits,class std::allocator >(void)" (_imp??0?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@QAE@XZ) referenced in function "class std::basic_string<char,struct std::char_traits,class std::allocator > * __cdecl std::_Uninit_move<class std::_Vector_iterator<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > >,class std::basic_string<char,struct std::char_traits,class std::allocator > *,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > >(class std::Vector_iterator<class std::basic_string<char,struct std::char
traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > >,class std::_Vector_iterator<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > >,class std::basic_string<char,struct std::char_traits,class std::allocator > *,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > &,struct std::_Swap_move_tag,struct std::_Range_checked_iterator_tag)" (??$_Uninit_move@V?$_Vector_iterator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@std@@pav?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@2@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@std@@YAPAV
?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@0@V?$_Vector_iterator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@0@0PAV10@AAV?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@0@U_Swap_move_tag@0@U_Range_checked_iterator_tag@0@@z)
F:\BIO-FLY\MEXOPEF:\MATLAB
1\BIN\MEX.PL: Error: Link of 'F:\BIO-FLY\MEXOPE1_CV~1\CamShift.mexw32' failed.Error using mex (line 206)
Unable to complete successfully.Error in cv.make (line 65)
eval(cmd);
Reply to this email directly or view it on GitHub:
#7 (comment)
from mexopencv.
its from the link you mentioned in your post. Since vs2008 did not have the stdint so i replaced with the one on the site.
http://msinttypes.googlecode.com/svn/trunk/stdint.h
i guess i should remove it when compiling it vs2010 ? is it the case?
from mexopencv.
well it still give the same error even though i have removed the stdint from the mexopencv include folder.
from mexopencv.
i don't know why you're getting different data types but it often happens in 32-bit/64-bit confusion.
btw, -DSECURE_SCL=1 should be -D_SECURE_SCL=1 in mex command
from mexopencv.
The compilation error was due to a conflicting MxArray.obj created by vs2008 and not cleaned by cv.make('clean'). After deleting this i was able to compile successfully with vs2010. Then still i got the same crash with the created binaries. I changed the _SECURE_SCL option of the projects in vs2010 and it works now. Lessons learned:
- It doesn't work with vs2008 build binaries.
- It also does not work with pre-build binaries.
- Build binaries in vs2010 must have _SECURE_SCL added into the options.
- mexopts.bat must have the option set to _SECURE_SCL=1.
Thanks,
from mexopencv.
Hi Rafid,
I got the same problem here. Could you please advise how to set option "_SECURE_SCL" in vs2010? Thank you.
from mexopencv.
Related Issues (20)
- Mexopencv using MatLab Runtime
- Using homebrew to install OpenCV==3.4.1
- windows opencv3.4.1 cmake
- Setting up mexopencv for matlab 2018b HOT 2
- No output from cv.getBuildInformation() in Octave 5.1.0
- maybe bug about the queryIdx and trainIdx
- ld: symbol(s) not found for architecture x86_64
- Invalid MEX-file : Missing dependent shared libraries
- [error 3] gcc >= 4.4 g++ >= 4.4 is installed
- v3.2.0 and xfeatures2d HOT 1
- mexopencv not compiling HOT 2
- error in setup opencv and mexopencv
- how Mac to mexopencv HOT 1
- [lib/mexopencv_features2d.o] Error 255 HOT 1
- MxArray::toMoments out of order arguments to cv::Moments
- Consider leveraging MATLAB in your CI
- MATLAB Error: Unrecognized function or variable 'FeaturesFinder_'.
- why can't I use the 'cv.detectMarkers' function???
- Hi all, I have a big problem when I am using matlab R2021a to builed mexopencv. HOT 1
- mexopencv building error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mexopencv.