Results 1 to 11 of 11

Thread: 2019 linker error

  1. #1
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Default 2019 linker error

    After installing the commercial version of Qt 4.4.0 and attempting to compile a test project in Visual Studio 2008 I get:
    ------ Build started: Project: qttest2, Configuration: Debug Win32 ------
    Linking...
    qtmaind.lib(qtmain_win.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::locale::facet::_Register(void)" (__imp_?_Register@facet@locale@std@@QAEXXZ) referenced in function "class std::ctype<char> const & __cdecl std::use_facet<class std::ctype<char> >(class std::locale const &)" (??$use_facet@V?$ctype@D@std@@@std@@YAABV?$ctype@D @0@ABVlocale@0@@Z)
    qtmaind.lib(qtmain_win.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<char>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@local e@2@@Z) referenced in function "class std::ctype<char> const & __cdecl std::use_facet<class std::ctype<char> >(class std::locale const &)" (??$use_facet@V?$ctype@D@std@@@std@@YAABV?$ctype@D @0@ABVlocale@0@@Z)
    qtmaind.lib(qtmain_win.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<unsigned short>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@local e@2@@Z) referenced in function "class std::ctype<unsigned short> const & __cdecl std::use_facet<class std::ctype<unsigned short> >(class std::locale const &)" (??$use_facet@V?$ctype@G@std@@@std@@YAABV?$ctype@G @0@ABVlocale@0@@Z)
    C:\Documents and Settings\Kyle\My Documents\Visual Studio 2008\Projects\qttest2\Debug\qttest2.exe : fatal error LNK1120: 3 unresolved externals
    Build log was saved at "file://c:\Documents and Settings\Kyle\My Documents\Visual Studio 2008\Projects\qttest2\qttest2\Debug\BuildLog.htm"
    qttest2 - 4 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    How can I resolve this issue?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: 2019 linker error

    What do you consider a "test project"?

  3. #3
    Join Date
    Jun 2008
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: 2019 linker error

    I am newbe and I have same problem. I had created application with Application Wizard as described in QT Tutorial. I don't add any code, just try to build new solution and give same result. IMHO It's mean that qt libraries are using other version of crt library as my installation of VS 2008. Can somebody tell how to resolve this problem or rebuild QT-commercial. Thanks.
    My configuration: MS VS 2008 Standard, Vista Home Premium 32-bit
    Last edited by Azriel; 1st June 2008 at 16:40.

  4. #4
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Default Re: 2019 linker error

    Quote Originally Posted by wysota View Post
    What do you consider a "test project"?
    A blank Qt application, just the GUI.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: 2019 linker error

    What do you mean by "blank"? Could you provide the code?

  6. #6
    Join Date
    Feb 2008
    Posts
    50
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 2019 linker error

    Got the same thing with QT 4.4.0 and VC++ 2008 express
    When i add CONFIG += console it compiles without linking errors. But i don`t need the console
    Weird.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: 2019 linker error

    So how about showing us the code?

  8. #8
    Join Date
    Feb 2008
    Posts
    50
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 2019 linker error

    It`s the standart code from the examples. Nothing changed. I just get any example ... got Desktop -> Systray first, compile it without Config += console in the project file and it gives exactly 3 linking errors. When i enable console, its linking ok.
    Fixed it with recompiling QT 4.4.0 with VC++ Express 2008. Now its ok. It took several hours tho... that webKit put some hours to compile.

  9. #9
    Join Date
    Feb 2008
    Posts
    50
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 2019 linker error

    If someone gets the same error.. i fixed it with compiling C:\Qt\4.4.0\src\winmain again with my version of the MS crt files. The other libs are intact from the install. All seems working for now.

  10. #10
    Join Date
    Jun 2008
    Posts
    9
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: 2019 linker error

    Thanks for the information. Here is a tutorial on how to compile Qt with Visual Studio's compiler: http://tom.paschenda.org/blog/?p=28
    It's quite helpful. The compiling process takes a while, but it will be worth it.
    Last edited by pcmantinker; 4th July 2008 at 06:24.

  11. #11

    Default Re: 2019 linker error

    Quote Originally Posted by sadjoker View Post
    If someone gets the same error.. i fixed it with compiling C:\Qt\4.4.0\src\winmain again with my version of the MS crt files. The other libs are intact from the install. All seems working for now.
    thanks pal, it helped me too! I advise to recompile winmain with both Release and Debug configurations

Similar Threads

  1. QPSQL problem
    By LoneWolf in forum Installation and Deployment
    Replies: 60
    Last Post: 4th November 2009, 14:22
  2. Compile 4.4.0
    By LordQt in forum Installation and Deployment
    Replies: 18
    Last Post: 29th May 2008, 13:43
  3. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 12:57
  4. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 02:49
  5. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 12:19

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.