i m trying to use DCMTK library built in MSVC in my qt application.although i have added libs in my .pro file like Libs+= -Ldcmtk开发者_如何学编程/lib -ofstd -dcmdata..i have also include .h files of these libraries but i m getting undefined reference error for each function i m calling of these library.. what i m missing..
Function names are not the same in the libs - c++ standard does not define it so both msvc and g++ define them their own way.
Check this post. Qt/mingw32 undefined reference errors... unable to link a .lib
There are some work-arounds like this for instance (dll): http://www.emmestech.com/moron_guides/moron1.html
If you are getting an undefined reference error then you haven't linked to the correct library.
You use Qt Creator?
Say you have a lib file named libodbc32.a Then you should add a lib like this:
LIBS += -L [path to the libodbc32.a] -L [path to libsystemc.a] -lodbc32 -lsystemc
So I think you have linked not in an appropriate way.
精彩评论