Cannot link statically with MSVC2008.
-
OK, that explains why I can't use them as static libs...
-
Oh, and be aware of license implications when using static libs!
If you use the (L)GPL version of Qt, it's most likely that you need to release the source code of your application under GPL too (I'm not a lawyer, so do your own research beforehand!). If you do not want to release your source code, you will be in need of a commercial license.
-
Another thing. My compilation of Qt became so big I ran out of disk... :-(
I will create a new VM with bigger disk and start over.
My question is, if I compile Qt 4.7.4 do I need the SDK at all? Or do I get "my own" SDK when I build Qt? -
The SDK consists of the Qt libs itself ("Qt") and additional tools, like Qt Creator, a free toolchain (MinGW) - if you choose that.
So, basically no, you do not necessarily need the SDK. Qt Designer, Assistant, Linguist, etc. are part of the libs. Qt Creator can be downloaded separately.
-
So I get all I need (static libs and MSVC2008 tool chain) from compiling Qt 4.7.4, except Qt Creator?
BTW is "Qt lib" & just "Qt" the same thing?Sorry for newbie questions... :-)
-
Yes and yes :-)
-
I've built Qt (lib), installed Qt Creator, and when I try to build my application it cannot find the Windows SDK LIB-files. I can see them in the file system (But Qt cannot). What is the best way to add LIB path? In my .pro-file, in the mkspec-file or declare an environment variable?
Or should I try to make Qt Creator run the MSVC2008 vcvarsall.bat setup file?
-
My mistake! I had the MinGW tool chain specified, should be MSVC2008...
Now my exe file is 13 MB instead of the 35 kB it was when I linked it dynamically. 13 MB sure sounds as if I have built-in the static libs which was my goal!
But when I try to run it on a machine where Qt is not installed, I get "The application has failed to start because its side-by-side configuration is incorrect..."
Maybe my build was unsuccessful after all? -
Then perhaps the VC redist are missing.
I'm not 100% sure, how to link them statically.
This is msvcrt*.dll etc which is installed inside the windows directory in SxS -
I have VC redist installed...
-
But it does seem to have something to do with the redist. The Event Log says (dummyTest.exe is my program...)
Activation context generation failed for "D:\tools\qttests\test1\dummyTest.exe". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosisSo I unistalled the VC redist, rebooted, and installed the VC redist again. Same fault. And the version 9.0.21022.8 from the log post matches exactly the redist version. What else is there to do?
-
which version of redist?
debug redist are never installed!
use the release build on that machine and it should work.
Debug versions are never meant for distribution... -
THANK YOU!
As you say (Gerolf) I made a Debug build, but with a Release build I can run it on another machine than the one I built on.
Thanx again! Now I'm happy :-) -
[quote author="Gerolf" date="1320747501"]which version of redist?
debug redist are never installed!
use the release build on that machine and it should work.
Debug versions are never meant for distribution...[/quote]Not only that they are not meant for distribution, but Microsoft does not allow you to do so!