Having trouble adding User32.lib to project as linked library.
-
For which architecture are you building ?
-
wrote on 22 Oct 2016, 19:47 last edited by
You mean Windows right?
-
No, I mean x86 vs x86_64
-
wrote on 22 Oct 2016, 19:55 last edited by
Or do you mean... x86/x64? In which case I'm doing x86 since the 64 bit QT Creator kit is broken.
-
wrote on 22 Oct 2016, 20:03 last edited by
Hi, I just tested on my Windows 10 with 32-bit MSVC2015, and to avoid that linker error you only have to add
LIBS += -luser32
to your .pro file. -
wrote on 22 Oct 2016, 20:04 last edited by
Something's up then cause I already tried that..
-
Qt Creator is 32bit but that has no influence on the version of Qt you are using.
-
wrote on 22 Oct 2016, 20:10 last edited by Crag_Hack
You're talking about my previous remark right? I mean the 64 bit MSVC build kit in QT Creator is broken. see here:
https://forum.qt.io/topic/72576/qt-creator-complaining-about-msvc-build-and-run-kit/3
D'oh the screenshot no longer works...I''l have to fix that -
Then also a silly question but, when you installed Visual Studio 2015, did you install the C++ stuff ? It's not selected by default.
-
wrote on 23 Oct 2016, 05:46 last edited by
I just did the default install, which didn't install the compilers; I knew because they didn't show up in QT Creator. I followed the instructions as here in comment 3 for question 1 in order to install the compilers. Do you think I need to install more C++ components?
-
Did you check in Qt Creator that it detects the compilers ?
-
wrote on 23 Oct 2016, 20:28 last edited by
-
So that part is good. What about the Kits ?
-
wrote on 23 Oct 2016, 20:52 last edited by
-
Then it looks like you are trying to setup a 32bit debugger on your 64bit Qt.
-
wrote on 23 Oct 2016, 22:37 last edited by Crag_Hack
The selected kit for the project is the first (default) one though.
Desktop QT 5.7.0 MSVC2015 32bit -
wrote on 24 Oct 2016, 19:47 last edited by
I'll try verbose to see if there's any more info. If not I might just witch to Visual Studio. Any major functional trade-offs to using Visual Studio vs QT Creator? I know about the plugin.
Thanks! -
Qt Creator is usually simpler to use and setup.
-
wrote on 27 Oct 2016, 23:56 last edited by
Update: I tried adding line below with success, program compiles now. Any ideas as to why QT Creator is being so ornery? Thanks again for all your help.
#pragma comment (lib, "User32.lib")
16/25