[Qt-interest] Linker Error I do not understand

Matthias Pospiech matthias.pospiech at gmx.de
Wed Jun 23 22:38:20 CEST 2010


Justus Best schrieb:
> Hi,
>
> Your pro file looks fine to me, but if I have to fight with such 
> problems I would start with the most simple pro file possible so just 
> absolut filesystem path, only TEMPLATE = lib and CONFIG += dll and the DEFINES you really need. 

I could deduce the error to a single line: #include <QWidget>

The src.pro (only this file is used for qmake) contains:

----------->
CONFIG += qt
CONFIG += warn_on
CONFIG += thread
CONFIG += dll
CONFIG += debug
CONFIG -= release

TEMPLATE = lib

TARGET = uEyeCamera

DEFINES += QT_DLL UEYECAMERA_DLL UEYECAMERA_MAKEDLL

INCLUDEPATH += C:/Users/Matthias/Documents/SVN/Library/include/uEye/

LIBS += -LC:/Users/Matthias/Documents/SVN/Library/lib/other/uEye -luEye_api

HEADERS += QCameraGlobal.h \
    QCameraWidget.h \
    QRgbMatrix.h \
    qcamera.h

SOURCES += QCameraWidget.cpp \
    QRgbMatrix.cpp \
    qcamera.cpp
<-----------

qcamera.h  contains the following:
----------->
#ifndef QCAMERA_H
#define QCAMERA_H

#include <QWidget>
#include "QCameraGlobal.h"

class QCAMERA_EXPORT QCamera
{
public:
    explicit QCamera();
    virtual ~QCamera();
};

#endif // QCAMERA_H
<-----------

this results in this functions:

_ZN7QCameraC1Ev
_ZN7QCameraC2Ev
_ZN7QCameraD0Ev
_ZN7QCameraD1Ev
_ZN7QCameraD2Ev
_ZTV7QCamera


if I remove the line with #include <QWidget>
in camera.h then everything is included:

_CRT_MT
_Z4qRgbiii
_Z5qGrayiii
_ZN10QRgbMatrix10setColoredEb
_ZN10QRgbMatrix11isDataValidEv
_ZN10QRgbMatrix12bitsPerPixelEv
_ZN10QRgbMatrix12isMonochromeEv
_ZN10QRgbMatrix12setDataValidEb
_ZN10QRgbMatrix13setMonochromeEb
_ZN10QRgbMatrix15setBitsPerPixelEi
... (further +100 lines)

What does that mean?

Matthias



More information about the Qt-interest-old mailing list