You are not logged in.

Dear visitor, welcome to If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Wednesday, May 10th 2017, 12:21am

QT5.8 -static -static-runtime needs VisualStudio Runtime

I tried to compile QT5.8 statically by using MSVC++2015. After compiling the standard dynamic version I tried a -static version using a dynamic runtime library and then a static runtime.

Source code

configure -prefix /testqt5.8dynRT  -static   -opengl desktop -no-openssl   -opensource  -confirm-license    -skip qtwebkit   -release 

configure -prefix /testqt5.8statRT  -static -static-runtime  -opengl desktop -no-openssl   -opensource  -confirm-license    -skip qtwebkit   -release 

To compile my program I had to switch from \MD to \MT and the executable files became bigger. BUT that was the only difference. Both still needed the runtime DLLs although I used " -static -static-runtime" as a parameter in the second case.
And it clearly had an influence. Otherwise I would not have been forced to switch to \MT.

P.S.: An other odd occasion was the fact that compiling "static -static-runtime" was relatively fast. Later "jom install" made several calls to cl.exe. I always thought that everything is done after the make and "make install" just copies the files?

Edit: Someone called Krishty alluded to me in a German board to deactivate "Link Library Dependencies". It worked, but why. Is that similar to /MT just affecting the libraries?

This post has been edited 1 times, last edit by "Freak5" (May 12th 2017, 1:10pm)