Reputation: 33
I am trying to create a Qt program that is able to control an Amptek 8000a MCA (a device that is connected via COM port for radiation detection purposes). The manufacturer provides c++, labview and vb API, but I am having a lot of trouble with Qt (C++) to recognise the dll. I have added the library using Qt's in-built add library function but I get lots of errors undefined reference to...
e.g. error: undefined reference to PmcaPowerUp@4
. The relevent part of my pro file looks like:
win32: LIBS += -L$$PWD/Libraries/ -lPMCADLL
INCLUDEPATH += $$PWD/Libraries
DEPENDPATH += $$PWD/Libraries
win32:!win32-g++: PRE_TARGETDEPS += $$PWD/Libraries/PMCADLL.lib
Can I use the .dll provided in the package above?
Do I have to compile it myself with mingw/qt?
It's giving me a lot of trouble when all you have to do with Matlab is loadlibrary('PMCADLL.dll','PmcaCom.h')
.
Done.
How I can get my project to link to the dll correctly or use mingw
to compile the dll with the source files the manufacturer provides?
Upvotes: 1
Views: 121
Reputation: 724
If a dll you have was generate on a platform or even with a compiler that is not compatable with your own you may (and would) have problems with it. So if you have a source code the best way is to compile a dll using it. Take a look at docs.
Upvotes: 2