Reputation: 11
How do I exactly set up QT5 to be fully working?
I downloaded and installed: Qt 5.2.1 for Windows 32-bit (VS 2012, 541 MB) Visual Express C++ 2012
I ran the examples on QT Creator. They are all compiled and running fine. Simple hello.cpp also works okay
However, I can never understand why:
Running command prompt of QT or C++ native from VS will not let me do "make". qmake -project and qmake XXXX.pro is running fine. (Note: I can do compile well in QTCreator)
Subclassing cannot find its way to the folder. QTCreator complain LNK2019 and LNK1120
Could someone please list step by step on how to set these two software works seamlessly (QT5 and VS2012) from clean installation? I simply want to start coding gui with C++; nothing complex yet.
P.S. I could not find clear answer and guide regarding this matter. I can't register on QT site too (always say "no content to display" on registration page).
Anyway, thank you for the time, effort and attention.
Update: I have windows 8 at home, installed Qt5 and VS12. It works seamlessly. At work, the IT guy is stubborn to install windows 7.... Qt5 and VS12 in windows 7 is not the combo apparently. When compiling, it complains "where the hell is QDialog, QApplication, Q.... or whatever #include...?" I will try something else next week and will update you all.
Upvotes: 0
Views: 596
Reputation: 11
Wow, what a mind blowing.
Here is the story in my Win7: 1. Installed VS2013, Qt does not like it. Then, I install VS2012. Still does not like it. Then, uninstall everything including deleting C:\Program Files\Microsoft VS 11.0 and 12.0. 2. I install VS2010 and QT for VS2010. Still not working.
Finally, uninstall and delete everything (including all folders in program files and c:\QT), I install VS2012 first then install QT for VS2012. It works....
Hope this help anyone who has problem in compiling during their first install in Win7.
Upvotes: 1
Reputation: 2522
in vs2008 there is vsvars32.bat
that sets up the variables to let you call make from basic cmd.exe. maybe something exists for Vs2012.
under windows systems its not make
, it should be nmake
Upvotes: 0
Reputation: 5620
Compiling a QT5 application in VS2012 can be really tricky depending on your current setup. Here's a summary of the most important guidelines to make it work like a charm:
qmake yourProject.pro
in the command prompt. This shouldAny problem that may occur, for example compilation failure, is related to one of these steps being incorrectly done.
Useful references:
How to create a QMake project files, How to set environment variables
Upvotes: 0