Results 1 to 6 of 6

Thread: Compiler Error Q3PtrList (VS2005 on XP and Qt4.3.3)

  1. #1

    Default Compiler Error Q3PtrList (VS2005 on XP and Qt4.3.3)

    Hi,

    I am using qt4.3.3.

    when I compile with nmake and VS 8 i get a linker error "unresolved external symbol" for Q3PtrList<>. With VS 6 it works fine, also with VS 8 and Windows Vista.

    Its the combination VS8, Windows XP and Qt4.3.3. I know I could replace the QPtrList with Qlist<> but i wonder why it works on VS6..

    Any ideas?

    Regards,

    stef

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Compiler Error Q3PtrList (VS2005 on XP and Qt4.3.3)

    Do you link your application with Qt3Support module?

  3. #3

    Default Re: Compiler Error Q3PtrList (VS2005 on XP and Qt4.3.3)

    Hi,

    yes I link with Q3Support-Module. The problem is, that the error only occurs in some sources. In others I can use Q3PtrList without errors.

    The error is as follows:

    status.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) const Q3PtrList<char>::`vftable'" (__imp_??_7?$Q3PtrList@D@@6B@)

    Could that be a linker problem of visual studio 2005? i am using SP1.

    regards

  4. #4
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Compiler Error Q3PtrList (VS2005 on XP and Qt4.3.3)

    Throw away Qt3 support - especially when it's that easy like with Q3PtrList.
    Looks like you don't link against a module which is exporting Q3PtrList<char> but use a header from that module. Look in which header the Q3PtrList<char> is exported.

  5. #5

    Default Re: Compiler Error Q3PtrList (VS2005 on XP and Qt4.3.3)

    Okay, I have replaced the occurences of Q3PtrList in these files with the QList. But I still get the error even though I dont't use the Q3PtrList any more.

    I don't have an idea why??

  6. #6

    Default Re: Compiler Error Q3PtrList (VS2005 on XP and Qt4.3.3)

    okay i solved it. there is a bug when you include both Q3StrList and Q3PtrList and use a Q3PtrList<char> in the code.

    thats when the linker error occurs.

Similar Threads

  1. Replies: 3
    Last Post: 26th March 2008, 11:04

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.