[Qt-interest] Linker Error I do not understand
Matthias Pospiech
matthias.pospiech at gmx.de
Mon Jun 21 23:01:14 CEST 2010
Jason H schrieb:
> Either that class is not in that library, or those functions aren't in the library. Sure, you have the .h, which specifies the signature, but when it looked at the library it wasn't there.
>
> Either update your library to cinlcude that class, or link in the QCW class's library.
>
Well, if I add the whole dll classes to the example project it compiles
and links. So the code itsself should be ok.
The dll also includes the files, as can be seen in the src.pro
contains(CONFIG, uEyeCameraDll):CONFIG += dll
else:CONFIG += staticlib
win32:uEyeCameraDll:DEFINES += UEYECAMERA_MAKEDLL
HEADERS += $${SOURCEPATH}/QCameraGlobal.h \
$${SOURCEPATH}/QuEyeCamera.h \
$${SOURCEPATH}/QRgbMatrix.h \
$${SOURCEPATH}/QCameraWidget.h
SOURCES += $${SOURCEPATH}/QuEyeCamera.cpp \
$${SOURCEPATH}/QRgbMatrix.cpp \
$${SOURCEPATH}/QCameraWidget.cpp
the classes are all defined with
class QCAMERA_EXPORT QCameraWidget : public QWidget
{
public:
...
where QCAMERA_EXPORT is defined as: __declspec(dllexport), using this code:
#if defined(UEYECAMERA_NODLL) // Do not create a DLL library
#define QCAMERA_EXPORT
#else
#if defined(UEYECAMERA_MAKEDLL) // create a DLL library
#define QCAMERA_EXPORT __declspec(dllexport)
#else // use a DLL library
#define QCAMERA_EXPORT __declspec(dllimport)
#endif
#endif
So from this I do not see why the class should not be part of the dll.
More information about the Qt-interest-old
mailing list