Results 1 to 5 of 5

Thread: Transition from Qt 5.2 to 5.4 -- Visual Studio linker errors

  1. #1
    Join Date
    May 2015
    Posts
    3
    Qt products
    Qt5

    Default Transition from Qt 5.2 to 5.4 -- Visual Studio linker errors

    Hey everyone,

    I've recently moved from Qt 5.2 to 5.4 and my applications stopped compiling. I'm using the msvc2013_64_opengl Qt distribution. I'm getting the following error (recompiling application from scratch):
    Qt Code:
    1. qtmain.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol __imp_CommandLineToArgvW
    To copy to clipboard, switch view to plain text mode 
    Has anyone encountered this?

    Best regards,
    Kuba

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Transition from Qt 5.2 to 5.4 -- Visual Studio linker errors

    Did you change your MSVC link options to point to your current Qt distribution?

  3. #3
    Join Date
    May 2015
    Posts
    3
    Qt products
    Qt5

    Default Re: Transition from Qt 5.2 to 5.4 -- Visual Studio linker errors

    Currently I have only one Qt distribution, and I changed the path in Visual Studio Add-in. I don't know if it matters, but QTDIR is also set up correctly.

    Best regards,
    Kuba

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Transition from Qt 5.2 to 5.4 -- Visual Studio linker errors

    Well, the only other thing I could question is whether you have MSVC set up to actually do a 64-bit build. Some compiler define I don't remember at the moment switches between 32 and 64 bit modes. These things are obscure with MSVC; you get one project working and you forget exactly which voodoo you used to do that, and then you get to figure it out all over again for the next one.

  5. #5
    Join Date
    May 2015
    Posts
    3
    Qt products
    Qt5

    Default Re: Transition from Qt 5.2 to 5.4 -- Visual Studio linker errors

    I found it. There probably was a change in implementation in Qt windows core. In addition to what Qt 5.2 required, the application needs to link shell32.lib. Thanks for your help.

    Best regards,
    Kuba

Similar Threads

  1. Using Qt 5.4.1 Visual Studio 2013 libs in Visual Studio 2010
    By ^NyAw^ in forum Installation and Deployment
    Replies: 0
    Last Post: 6th March 2015, 11:20
  2. Replies: 0
    Last Post: 19th March 2013, 19:48
  3. Replies: 0
    Last Post: 19th May 2011, 13:28
  4. Qt visual studio errors before compiling / deploy on Windows Mobile platform
    By boblatino in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 23rd July 2010, 03:38
  5. C++ Compiling Errors when use Visual Studio 6.0
    By seguprasad in forum General Programming
    Replies: 1
    Last Post: 3rd February 2009, 12:47

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.