Matlab mex linker error with qt 5 -


hello have matlab shared librarys uses qt modules. qt 4 had no problems qt 5 (qt 5.0.1 windows 32-bit (vs 2010, 481 mb) ) following errors:

importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: static void __cdecl qlistdata::dispose(struct qlistdata::data *)" (__imp_?dispose@qlistdata@@saxpeaudata@1@@z)" in funktion ""public: __cdecl `public: __cdecl qlist<class qstring>::qlist<class qstring>(class qlist<class qstring> const &)'::`5'::cleanup::~cleanup(void)" (??1cleanup@?4???0?$qlist@vqstring@@@@qeaa@aebv1@@z@qeaa@xz)".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: __cdecl qstring::~qstring(void)" (__imp_??1qstring@@qeaa@xz)" in funktion ""public: void * __cdecl qstring::`scalar deleting destructor'(unsigned int)" (??_gqstring@@qeaapeaxi@z)".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) void __cdecl qt_assert_x(char const *,char const *,char const *,int)" (__imp_?qt_assert_x@@yaxpebd00h@z)" in funktion ""public: class qstring const & __cdecl qlist<class qstring>::at(int)const " (?at@?$qlist@vqstring@@@@qebaaebvqstring@@h@z)".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: virtual __cdecl qfile::~qfile(void)" (__imp_??1qfile@@ueaa@xz)" in funktion "mexfunction".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: class qstring & __cdecl qstring::operator=(class qstring &&)" (__imp_??4qstring@@qeaaaeav0@$$qeav0@@z)" in funktion "mexfunction".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: class qbytearray & __cdecl qbytearray::operator=(class qbytearray &&)" (__imp_??4qbytearray@@qeaaaeav0@$$qeav0@@z)" in funktion "mexfunction".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: class qbytearray __cdecl qbytearray::tobase64(void)const " (__imp_?tobase64@qbytearray@@qeba?av1@xz)" in funktion "mexfunction".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: unsigned short __cdecl qstring::toushort(bool *,int)const " (__imp_?toushort@qstring@@qebagpea_nh@z)" in funktion "mexfunction".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: char * __cdecl qbytearray::data(void)" (__imp_?data@qbytearray@@qeaapeadxz)" in funktion "mexfunction".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: __cdecl qbytearray::qbytearray(int,char)" (__imp_??0qbytearray@@qeaa@hd@z)" in funktion "mexfunction".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: virtual void __cdecl qfiledevice::close(void)" (__imp_?close@qfiledevice@@ueaaxxz)" in funktion "mexfunction".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: __cdecl qbytearray::~qbytearray(void)" (__imp_??1qbytearray@@qeaa@xz)" in funktion "mexfunction".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: class qstringlist __cdecl qstring::split(class qstring const &,enum qstring::splitbehavior,enum qt::casesensitivity)const " (__imp_?split@qstring@@qeba?avqstringlist@@aebv1@w4splitbehavior@1@w4casesensitivity@qt@@@z)" in funktion "mexfunction".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: __cdecl qstring::qstring(class qbytearray const &)" (__imp_??0qstring@@qeaa@aebvqbytearray@@@z)" in funktion "mexfunction".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: class qbytearray __cdecl qiodevice::readline(__int64)" (__imp_?readline@qiodevice@@qeaa?avqbytearray@@_j@z)" in funktion "mexfunction".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: virtual bool __cdecl qfile::open(class qflags<enum qiodevice::openmodeflag>)" (__imp_?open@qfile@@ueaa_nv?$qflags@w4openmodeflag@qiodevice@@@@@z)" in funktion "mexfunction".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: __cdecl qfile::qfile(class qstring const &)" (__imp_??0qfile@@qeaa@aebvqstring@@@z)" in funktion "mexfunction".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) private: static struct qtypedarraydata<unsigned short> * __cdecl qstring::fromascii_helper(char const *,int)" (__imp_?fromascii_helper@qstring@@capeau?$qtypedarraydata@g@@pebdh@z)" in funktion "mexfunction".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: __cdecl qbytearray::qbytearray(void)" (__imp_??0qbytearray@@qeaa@xz)" in funktion "mexfunction".  importpddlutbase64.obj : error lnk2019: verweis auf nicht aufgelöstes externes symbol ""__declspec(dllimport) public: __cdecl qstring::qstring(void)" (__imp_??0qstring@@qeaa@xz)" in funktion "mexfunction".  

the problem comes use of #include <qfile> #include <qstringlist>. compile file use following mex command (mex haves similar syntax gcc):

mex -ic:\qt\qt5.0.1\5.0.1\msvc2010\include\qtcore -ic:\qt\qt5.0.1\5.0.1\msvc2010\include\ -lc:\qt\qt5.0.1\5.0.1\msvc2010\lib -lqtmain -lqt5core -lqt5gui -lqt5widgets importpddlutbase64.cpp 

what else should include shared library linked ???

update:

i tryed same using mingw. use following code:

#include <qfile> #include <qstringlist> //#include <qclipboard.h> //#include <qapplication>   int main() { qstring str; str = qstring("hallo hallo2 hallo 3"); qstringlist elems = str.split( " " );  return 0; } 

and compile using following gcc commands:

gcc -c -wall -ic:\qt\qt5.0.1\5.0.1\msvc2010\include\qtcore -ic:\qt\qt5.0.1\5.0.1\msvc2010\include\ testqt.cpp gcc testqt.o -lc:\qt\qt5.0.1\5.0.1\msvc2010\lib -lqtmaind -lqt5cored -lqt5guid -lqt5widgetsd -lqt5axcontainerd -lqt5axcontainer -o foo.exe 

and here following linker errors:

testqt.o:testqt.cpp:(.text+0x43): undefined reference `_imp___zn7qstringaserks_' testqt.o:testqt.cpp:(.text+0x8c): undefined reference `_imp___znk7qstring5spliterks_ns_13splitbehavioren2qt15casesensitivitye' testqt.o:testqt.cpp:(.text$_zn10qarraydata10sharednullev[qarraydata::sharednull()]+0x4): undefined reference `_imp___zn10qarraydata11shared_nulle' testqt.o:testqt.cpp:(.text$_zn7qstringc1epkc[qstring::qstring(char const*)]+0x39): undefined reference `_imp___zn7qstring16fromascii_helperepkci' testqt.o:testqt.cpp:(.text$_zn15qtypedarraydataite10deallocateep10qarraydata[qtypedarraydata<unsigned short>::deallocate(qarraydata*)]+0x1d): undefined reference `_imp___zn10qarraydata10deallocatee ps_jj' testqt.o:testqt.cpp:(.text$_zn5qlisti7qstringe7deallocepn9qlistdata4datae[qlist<qstring>::dealloc(qlistdata::data*)]+0x42): undefined reference `_imp___zn9qlistdata7disposeepns_4datae' testqt.o:testqt.cpp:(.eh_frame+0x13): undefined reference `__gxx_personality_v0' 


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -