[Qt-interest] Linker Error I do not understand

Matthias Pospiech matthias.pospiech at gmx.de
Wed Jun 23 23:16:25 CEST 2010


Matthias Pospiech schrieb:
> 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>
>
>   
It is not the line itself but the placement.

If I write

#include <QWidget>
#include "QCameraGlobal.h"
class QCAMERA_EXPORT QCamera
{

it does only include the functions of QCamera to the dll.

If I exchange to this

#include "QCameraGlobal.h"
#include <QWidget>
class QCAMERA_EXPORT QCamera
{

then everything is included in the dll.

This solved also the problem in the original project.

But why does this error happen?

Matthias



More information about the Qt-interest-old mailing list