PDA

View Full Version : Transition from Qt 5.2 to 5.4 -- Visual Studio linker errors



themoob
4th May 2015, 10:01
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):

qtmain.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol __imp_CommandLineToArgvW
Has anyone encountered this?

Best regards,
Kuba

d_stranz
4th May 2015, 20:27
Did you change your MSVC link options to point to your current Qt distribution?

themoob
4th May 2015, 22:13
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

d_stranz
5th May 2015, 04:48
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.

themoob
5th May 2015, 12:37
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