How do you static link Qt (/MT) with visual studio 2013?
-
-
No, on windows static libraries and import libraries have the same extension.
-
First download the sources, then edit that file in the sources
-
Correct
Then build
-
-
I downloaded what was labeled as the source. It is a folder called "qt-everywhere-opensource-src-5.3.1" It seems to be non-specific and not designed for any particular IDE or anything which goes back to my original intuition. Almost every subfolder has a .qmake.conf file and none seem to have any mention of /MD switches. I'm guessing now that we're suddenly switching gears and using the source instead of the VS2013 specific Qt version that downloading the VS2013 version was a waste of time and should be deleted.
- What are the specific next steps after downloading the source?
1a. What or which .qmake.conf files need to be edited and in what very very specific way?
- What are the specific next steps after downloading the source?
-
- Download zip file (yes, the tar.gz is smaller but the line endings won't please windows)
- Uncompress zip file
- Edit qt-everywhere-opensource-src-5.3.1\mkspecs\win32-msvc2013\qmake.conf
- start a VS command line (64 or 32 bit depending on your needs)
- configure Qt with the options you want and -static, if you don't use webkit anywhere, don't build it it'll save you time. Also take extra care of what plugin you will want to use and build them in it will also simplify your life.
- call jom.exe (that you can find in your current Qt install) or nmake
- Enjoy you favorite beverage while Qt's compiling
-
Thank you very much for posting specific steps.
- I do not see a mkspecs folder. What is wrong here? (see attached image)
- Is there a link that outlines all of the different build options?
-
Sorry, they are in qtbase
configure --help will show you what you can do.
I'd also recommend an out of source build so if something goes wrong you don't have to clean the sources.
-
I've done up to step 5 but didn't know what options to use so I just ran "configure -static". Now I need to run nmake but what should the specific commands and flags be?
nmake clean
qmake ?
namke ? -
just nmake, it's like *nix make but from Visual Studio
-
- Is the following error worth worrying about? (it looks like it is trying to run python for some reason..)
- Is it intelligent enough to still try to compile everything else or did it stop and possibly not get to other things that would have successfully compiled?
C:/Users/John/Desktop/qt-everywhere-opensource-s
rc-5.3.1/qtbase/include/QtCore/5.3.1/QtCore -IC:/Users/John/Desktop/qt-everywhere-opensource-src-5.3.1/qtbase/include/QtCore jsapi\qjsengine.h -o .moc\debu
g\moc_qjsengine.cpp
python C:/Users/John/Desktop/qt-everywhere-opensource-src-5.3.1/qtdeclarative/src/3rdparty/masm/create_regex_tables > RegExpJitTables.h
'python' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'python' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.C:\Users\John\Desktop\qt-everywhere-opensource-src-5.3.1>
-
Sorry, I've been building it for so long that I forgot the requirements.
You'll find "here":http://qt-project.org/doc/qt-5/build-sources.html#windows the requirements as well as a more verbose set of instructions to build from source.
-
The overall goal here is to just be able to have an embedded OpenCV window, buttons, labels, checkboxes, sliders, etc in a GUI for a desktop application. The other requirement is that the desktop application not depend on any DLLs except what always comes with windows.
ActivePerl, Python and Ruby are needed for ANGLE and Webkit respectively. I don't think I need those.. What are the specific flags to bypass those and to just build what I need for what is described above?
-
If you just want the "base" configure and build only qtbase, to avoid ANGLE use -opengl desktop