Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, March 2008
Qt Problems on Windows


Message 1 in thread

Hello Qt Users,

If this is the wrong e-mail list, sorry. Please point me in the right 
direction, because I don't know where else to turn!

I'm trying to compile a DLL on Windows, and I'm having problems (everything 
works fine on Linux). The error message that I see is:

MyClassName.obj : error LNK2001: unresolved external symbol "private: 
__thiscall QObject::QObject(class QObject const &)" (??0QObject@@AAE@ABV0@@Z)
AnotherClass.obj: error LNK2001: unresolved external symbol "private: 
__thiscall QObject::QObject(class QObject const &)" (??0QObject@@AAE@ABV0@@Z)
bin\mylibrary.dll : fatal error LNK1120: 1 unresolved externals

So, the linker can't find __thiscall QObject::QObject(const QObject&). Using 
Dependancy Walker, I can see a QObject::QObject(const QObject&), but its 
mangled name is ??0QObject@@QAE@ABV0@@Z.

??0QObject@@AAE@ABV0@@Z
is not
??0QObject@@QAE@ABV0@@Z

Can anybody tell me the meaning of the different name manglings, and (more 
importantly) what I have to do to get the thing to compile on Windows?

Thanks,


#!/jon
-- 
 [ signature omitted ] 

Attachment: signature.asc
Description: This is a digitally signed message part.


Message 2 in thread

Have your public library clases Q_DECL_EXPORT prefix?

Like

class Q_DECL_EXPORT QFLogDevice
{
...
};

You must introduce __declspec(dllexport) flag vhen compile win32 dll. This  
flag is defined in the Q_DECL_EXPORT macro.

Fanda

On Tue, 04 Mar 2008 13:57:58 +0100, Jonathan Anderson  
<jonathan.anderson@xxxxxxxx> wrote:

> Hello Qt Users,
>
> If this is the wrong e-mail list, sorry. Please point me in the right
> direction, because I don't know where else to turn!
>
> I'm trying to compile a DLL on Windows, and I'm having problems  
> (everything
> works fine on Linux). The error message that I see is:
>
> MyClassName.obj : error LNK2001: unresolved external symbol "private:
> __thiscall QObject::QObject(class QObject const &)"  
> (??0QObject@@AAE@ABV0@@Z)
> AnotherClass.obj: error LNK2001: unresolved external symbol "private:
> __thiscall QObject::QObject(class QObject const &)"  
> (??0QObject@@AAE@ABV0@@Z)
> bin\mylibrary.dll : fatal error LNK1120: 1 unresolved externals
>
> So, the linker can't find __thiscall QObject::QObject(const QObject&).  
> Using
> Dependancy Walker, I can see a QObject::QObject(const QObject&), but its
> mangled name is ??0QObject@@QAE@ABV0@@Z.
>
> ??0QObject@@AAE@ABV0@@Z
> is not
> ??0QObject@@QAE@ABV0@@Z
>
> Can anybody tell me the meaning of the different name manglings, and  
> (more
> importantly) what I have to do to get the thing to compile on Windows?
>
> Thanks,
>
>
> #!/jon



-- 
 [ signature omitted ]