Compiling for Visual Studio 2013 RC
-
I wanted to start with Qt using Visual Studio 2013 RC.
Of course the Visual Studio Add-in isn't working with 2013 yet, but for the first I would be totally happy if I could inlucde headers and link to the libs.
Unfortunately there is no prebuilt version available so I thought to compile one on my own, but I am not very lucky so far.From Visual Studio 2013 RC x64 Native Tools I start in the Qt source the configure.bat (the list of options is a little bit overwhelming so not sure what the best is here, I tried for example configure -release -nomake examples).
But it always stops with an fatal error. Here is a snippet which was built with
@configure -prefix % CD %\qtbase -release -opensource -nomake tests -nomake examples -platform win32-msvc2013@
(from this directory: C:\Users\Leandra\Downloads\qt-everywhere-opensource-src-5.1.1)@C:\Users\Leandra\Downloads\qt-everywhere-opensource-src-5.1.1\qtbase\src\corelib
\tools\qcryptographichash.cpp(200) : warning C4316: 'QCryptographicHashPrivate'
//some object on the heap isn't 32 alligned
: Das auf dem Heap zugeordnete Objekt ist möglicherweise nicht 32 ausgerichtet
qhash.cpp
qlist.cpp
qlinkedlist.cpp
qlocale.cpp
qlocale_tools.cpp
c:\users\leandra\downloads\qt-everywhere-opensource-src-5.1.1\qtbase\src\corelib
\tools\qlocale_tools.cpp(1257) : fatal error C1001: Interner Compilerfehler.
(Compilerdatei 'f:\dd\vctools\compiler\utc\src\p2\main.c', Zeile 227)
//talks about that I have to simplify the programm in the area of the above noted lines
Vereinfachen oder ändern Sie das Programm im Umfeld der oben aufgeführten Posit
ionen. Wählen
//Microsofts suggestion to call the technical support
Sie im Menü "Hilfe" von Visual C++ den Befehl "Technischer Support",
oder öffnen Sie die Hilfedatei des technischen Supports, um weitere Informatione
n zu erhalten.
c:\users\leandra\downloads\qt-everywhere-opensource-src-5.1.1\qtbase\src\corelib
\tools\qlocale_tools.cpp(1257) : fatal error C1001: Interner Compilerfehler.
(Compilerdatei 'f:\dd\vctools\compiler\utc\src\common\error.c', Zeile 771)
//Same as above
Vereinfachen oder ändern Sie das Programm im Umfeld der oben aufgeführten Posit
ionen. Wählen
Sie im Menü "Hilfe" von Visual C++ den Befehl "Technischer Support",
oder öffnen Sie die Hilfedatei des technischen Supports, um weitere Informatione
n zu erhalten.
//An error occured during creation or communication with the "slave"-Processs (in the meaning of subordination)
cl : Befehlszeile error D8040 : Fehler beim Erstellen oder Kommunizieren mit dem
untergeordneten Prozess.
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\BIN\amd64\cl.EXE"": Rückgabe-Code "0x2"
Stop.
Building qmake failed, return code 2@I have perl, python directX SDK installed on a windows 7 machine (and of course Visual Studio 2013 RC) - 64Bit. Try to compile Qt 5.1.1
I also tried to use the 2012 version. I can include the headers and link to the libs, but it fails due to missing MSVCP110D.dll (Visual Studio 2012 is not installed which explaines this, but I don't understand why it wants to use the debugging dll? confusing...)
I would be greatfull for any hints what I may could do. Maybe there is some official release planned for Vidual Studio 2013?
-
Hi and welcome to devnet,
Could you set your system language to english and post the log again ? Most people here won't understand german error text.
And if I understood correctly, you have a compiler internal error, which is surprising.
-
Thanks for your replies.
Unfortunately I am on a win 7 Pro machine which doesnt allow to change the system language (and changing the language in MSVC do not change the error messages Oo_). Therefore I added in comments some translations.I also used the "-platform win32-msvc2013" configure option, but it doesn't helped either :(
-
Under "Systemsteuerung"-->"Zeit, Sprache und Region"-->"Region und Sprache" you can change your "Aufenthaltsort" possibly changing to an English speaking country.
However, being weathered by Microsoft products in quite a numbers of years I would do such changes only with a recent mirror copy of the OS harddisk in the cupboard. BTW also Linux I have had my experiences. So it is not only MS products. Nevertheless all the side effects may take a couple of days of your life. :( IMHO not worth trying. ;-)The translations provided by Milania in the error's text flow seem to be reasonable. The first one points to a memory alignment problem. That is probably the key issue.
@
C:\Users\Leandra\Downloads\qt-everywhere-opensource-src-5.1.1\qtbase\src\corelib
\tools\qcryptographichash.cpp(200) : warning C4316: 'QCryptographicHashPrivate'
//some object on the heap isn't 32 alligned
: Das auf dem Heap zugeordnete Objekt ist möglicherweise nicht 32 ausgerichtet
@The heap alignment is typically as given by the target OS. You have 64 bit target, so it is 64 bit alignment on the heap. The module is tested for the alignment during the compilation and it requires 32 bit alignment. That is the conflict.
-
[quote author="Milania" date="1379161682"]And is there a way around? I mean it shoud compile on a 64 bit OS, shoudn't it?
[/quote]
Yes!
[quote author="Milania" date="1379161682"]I also just tested to use the Visual Studio 2013 RC x86 Native Tools, but I get nearly the same errors (specially the same allignment warning).[/quote]
I think I was not precise enough with my statements about target OS. It is the memory model you are choosing. There is no absolute requirement to use 64 bit for applications targeted to 64 bit OS.Personally, I am not really sure, if it is desirable by all means to go to 64 bit applications at this time. I had decided to go for 64 bit a while ago. I went through the trouble to compile Qt 4.8 with MinGW's 64 bit version. I knew that I do not require 64 bit immediately, but thought that 64 bit a little faster and I would be prepared for the future.
I had an eyeopener when checking out Qt5.1 (MinGW 32 bit). The compilation of the very same application was much faster. Reading through ASCII files was twice as fast with 32 bit.
Note: this cannot be the general rule and it certainly it depends on a lot of things.Your intention was to get a 32 bit compilation with the x86 tools. You need to check, if this is really 32 bit then.
With MSVC you can choose the byte alignment for your applications. So, you could switch to a 32 bit alignment. You need to "check out this.":http://lmgtfy.com/?q=visual+studio+byte+alignment However, I am not sure, if this is a good recommendation.
You are using a release candidate. I do not see the rational behind your decision, but this may be the source of your problem. You can switch to an official release like MSVC2012.
-
Hi,
It seems that this bug is related to the 2013RC CL optimizer. This work around works for me:go to the "qlocale_tools.cpp" file and put
#pragma optimize( "", off )
just before "static Bigint *diff(Bigint *a, Bigint *b)" function (around line 1184)and
#pragma optimize( "", on )
after this function.Regards
Simon -
Hey wow this worked! Thanks a lot Simon! (deep bow that you figured that out!)
Did you try running nmake yet?
Configuration is working now, but I wasn't able too get a full build with nmake. I think koahnig is right, this is not a job for a release candidate :-(
Greetings
Milania -
[quote author="Milania" date="1379180372"]Hey wow this worked! Thanks a lot Simon! (deep bow that you figured that out!)
Did you try running nmake yet?[/quote]
Did you start nmake from msvc native command prompt?
msvc does some crucial settings in the environment. If you are not using the native command prompt, you need to find those settings. There is a post around. Unfortunately, I do not remember how to find it. :-([quote author="Milania" date="1379180372"]
Configuration is working now, but I wasn't able too get a full build with nmake. I think koahnig is right, this is not a job for a release candidate :-(
[/quote]
It depends what you want to achieve. However, if you start out with Qt compilation and a release candidate you will face more problems.