March 31, 2011

drago60000 drago60000
Lab Rat
6 posts

Is there a way: qt 4.3.4 with Studio 2010?

 

Hello, together

unfortunately my search efforts did not end with success so I have to ask this question here: Is there a way to get Qt 4.3.4 to run with Visual Studio 2010?

I already managed to build Qt 4.7.1 under Studio 2010 using the Qt-everywhere-commercial package, so I already know the general direction this question should lead, but of course the steps I used for the new version don’t work at all for 4.3.4.

Before I put huge efforts into an expedition I would like to see if anybody has already done this and whether this could work at all.

So please enlighten me.

Drago

(hope this is the correct forum…)

7 replies

March 31, 2011

Gerolf Gerolf
Area 51 Engineer
3210 posts

Hi drago60000,

theoretically it should work. What will definitly miss is the mkspecs/win32-msvc2010 which you will have to create (perhaps a copy from 4.7.1 will work???). Then configure and nmake should do the job.

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

April 1, 2011

drago60000 drago60000
Lab Rat
6 posts

Hi, Gerolf

thanks for your feedback, but I fear it is not that simple. I just tried the very simple approach doing the following.

1. Downloaded qt-win-opensource-src-4.3.4.zip from ftp.qt.nokia.com/qt/source
I used this one because the commercial version of 4.3.4 is not available in the customer portal of digia

2. unpacked the zip in the goal dir

3. configured environment (QMAKESPEC, Path, QTDIR)

up to here all is similar to version 4.7.1

4. copied makespec msvc2010 from 4.7.1 to 4.3.4

5. started configure

result:

_Creating qmake…
execute: File or path is not found (make)
execute: File or path is not found (make)
Cleaning qmake failed, return code -1_

Seems that configure looks for a make, but I can only provide nmake.

I also tried qt-all instead of qt-win but the result is the same. qt-everywhere (which i used for 4.7.1) is not available for 4.3.4, since it starts with 4.6

So that seems a little more complicated.

April 1, 2011

Gerolf Gerolf
Area 51 Engineer
3210 posts

please compare the content of the mkspec for 2010 with the one you used before (2008? 2005?).
perhaps you have to adopt it.

and please try, whether you could configure for 2008 with the same settings, only QMAKESPEC changed.

  1. please provide your environment (cmd —> set) for all studio / qt realted settings
  2. your configure call
  3. perhaps the complete configure output as file on some file hosters and a link to check for other errors that might happen.
 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

April 1, 2011

drago60000 drago60000
Lab Rat
6 posts

I think the output of configure is short enough to post it here, because it stops near the start

—-

  1. D:WorkQt4.3.4_win>configure
  2.  
  3. This is the Qt/Windows Open Source Edition.
  4.  
  5. You are licensed to use this software under the terms of
  6. the GNU General Public License (GPL) version 2 or 3.
  7.  
  8. Type '2' to view the GNU General Public License version 2 (GPLv2).
  9. Type '3' to view the GNU General Public License version 3 (GPLv3).
  10. Type 'y' to accept this license offer.
  11. Type 'n' to decline this license offer.
  12.  
  13. Do you accept the terms of the license?
  14. y
  15. Environment:
  16.     INCLUDE=
  17.       C:Program Files (x86)Microsoft Visual Studio 10.0VCINCLUDE
  18.       C:Program Files (x86)Microsoft Visual Studio 10.0VCATLMFCINCLUDE
  19.       C:Program Files (x86)Microsoft SDKsWindowsv7.0Ainclude
  20.  
  21.     LIB=
  22.       C:Program Files (x86)Microsoft Visual Studio 10.0VCLIB
  23.       C:Program Files (x86)Microsoft Visual Studio 10.0VCATLMFCLIB
  24.       C:Program Files (x86)Microsoft SDKsWindowsv7.0Alib
  25.  
  26.     PATH=
  27.       C:Program Files (x86)Microsoft Visual Studio 10.0VSTSDBDeploy
  28.       C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDE
  29.       C:Program Files (x86)Microsoft Visual Studio 10.0VCBIN
  30.       C:Program Files (x86)Microsoft Visual Studio 10.0Common7Tools
  31.       C:WindowsMicrosoft.NETFrameworkv4.0.30319
  32.       C:WindowsMicrosoft.NETFrameworkv3.5
  33.       C:Program Files (x86)Microsoft Visual Studio 10.0VCVCPackages
  34.       C:Program Files (x86)HTML Help Workshop
  35.       C:Program Files (x86)Microsoft Visual Studio 10.0Team ToolsPerformance
  36.  Tools
  37.       C:Program Files (x86)Microsoft SDKsWindowsv7.0AbinNETFX 4.0 Tools
  38.       C:Windowssystem32
  39.       C:Windows
  40.       C:WindowsSystem32Wbem
  41.       C:WindowsSystem32WindowsPowerShellv1.0
  42.       C:Program Files (x86)ATI TechnologiesATI.ACECore-Static
  43.       d:workqt4.3.4_winbin
  44.       C:Program Files (x86)Microsoft Visual Studio 10.0VCbin
  45.       C:Program FilesCommon FilesMicrosoft SharedWindows Live
  46. You are licensed to use this software under the terms of the GNU GPL version 2 o
  47. r 3.
  48. See D:/Work/Qt/4.3.4_win/LICENSE.GPL2
  49.  or D:/Work/Qt/4.3.4_win/LICENSE.GPL3
  50.  
  51. Configuration:
  52.     minimal-config
  53.     small-config
  54.     medium-config
  55.     large-config
  56.     full-config
  57.     build_all
  58.     debug
  59. Qt Configuration:
  60.     release
  61.     debug
  62.     zlib
  63.     png
  64.     accessibility
  65.     opengl
  66.     ipv6
  67.     minimal-config
  68.     small-config
  69.     medium-config
  70.     large-config
  71.     full-config
  72.  
  73. QMAKESPEC...................win32-msvc2010 (env)
  74. Architecture................windows
  75. Maketool....................make
  76. Debug symbols...............yes
  77. Accessibility support.......yes
  78. STL support.................yes
  79. Exception support...........yes
  80. RTTI support................yes
  81. MMX support.................yes
  82. 3DNOW support...............yes
  83. SSE support.................yes
  84. SSE2 support................yes
  85. OpenGL support..............yes
  86. Direct3D support............no
  87. OpenSSL support.............no
  88. QDBus support...............no
  89. Qt3 compatibility...........yes
  90.  
  91. Third Party Libraries:
  92.     ZLIB support............qt
  93.     GIF support.............plugin
  94.     TIFF support............plugin
  95.     JPEG support............plugin
  96.     PNG support.............qt
  97.     MNG support.............plugin
  98.  
  99. Styles:
  100.     Windows.................yes
  101.     Windows XP..............yes
  102.     Windows Vista...........yes
  103.     Plastique...............yes
  104.     Cleanlooks..............yes
  105.     Motif...................yes
  106.     CDE.....................yes
  107.  
  108. Sql Drivers:
  109.     ODBC....................no
  110.     MySQL...................no
  111.     OCI.....................no
  112.     PostgreSQL..............no
  113.     TDS.....................no
  114.     DB2.....................no
  115.     SQLite..................plugin (qt)
  116.     SQLite2.................no
  117.     InterBase...............no
  118.  
  119. Sources are in..............D:WorkQt4.3.4_win
  120. Build is done in............D:WorkQt4.3.4_win
  121. Install prefix..............D:WorkQt4.3.4_win
  122. Headers installed to........D:WorkQt4.3.4_wininclude
  123. Libraries installed to......D:WorkQt4.3.4_winlib
  124. Plugins installed to........D:WorkQt4.3.4_winplugins
  125. Binaries installed to.......D:WorkQt4.3.4_winbin
  126. Docs installed to...........D:WorkQt4.3.4_windoc
  127. Data installed to...........D:WorkQt4.3.4_win
  128. Translations installed to...D:WorkQt4.3.4_wintranslations
  129. Examples installed to.......D:WorkQt4.3.4_winexamples
  130. Demos installed to..........D:WorkQt4.3.4_windemos
  131.  
  132. Creating qmake...
  133. execute: File or path is not found (make)
  134. execute: File or path is not found (make)
  135. Cleaning qmake failed, return code -1
  136.  
  137. ----------------------------
  138.  
  139. Environment
  140.  
  141. Path=C:Program Files (x86)Microsoft Visual Studio 10.0VSTSDBDeploy;C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDE;C:Program Files (x86)Microsoft Visual Studio 10.0VCBIN;C:Program Files (x86)Microsoft Visual Studio 10.0Common7 Tools;C:WindowsMicrosoft.NETFrameworkv4.0.30319;C:WindowsMicrosoft.NETFrameworkv3.5;C:Program Files (x86)Microsoft Visual Studio 10.0VCVCPackages;C:Program Files (x86)HTML Help Workshop;C:Program Files (x86)Microsoft Visual Studio 10.0Team ToolsPerformance Tools;C:Program Files (x86)Microsoft SDKsWindowsv7.0AbinNETFX 4.0 Tools;C:Program Files (x86)Microsoft SDKsWindowsv7.0Abin;%CommonProgramFiles%Microsoft SharedWindows Live;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)ATI TechnologiesATI.ACECore-Static;d:wo
  142. rkqt4.3.4_winbin;C:Program Files (x86)Microsoft Visual Studio 10.0VCbin;
  143. QMAKESPEC=win32-msvc2010
  144. QTDIR=d:workqt4.3.4_win
  145. VCINSTALLDIR=C:Program Files (x86)Microsoft Visual Studio 10.0VC

There are some differences between the mkspecs, but I think the basic question is, why make is used as Maketool (see output) and could it even work with nmake?

Right now we get to the point I’m trying to avoid. Although I like experiments like this I would really like to know if this (or something similar) has been done before because I am a bit short of time right now and must avoid testing different setups for hours.

Drago

April 1, 2011

Gerolf Gerolf
Area 51 Engineer
3210 posts

it should use nmake, not make.
So the point is, why does it use try to use make?

you could have a look at qmake make files, which are located here:
d:\work\qt4.3.4_win\qmake\Makefile.win32

this should be executed. on 4.7.2, there is some special statement at the top, checking the mkspecs. perhaps this also needs to be changed:

  1. !IF "$(QMAKESPEC)" == "win32-msvc" || "$(QMAKESPEC)" == "win32-msvc.net" || "$(QMAKESPEC)" == "win32-msvc2002" || "$(QMAKESPEC)" == "win32-msvc2003" || "$(QMAKESPEC)" == "win32-msvc2005" || "$(QMAKESPEC)" == "win32-msvc2008" || "$(QMAKESPEC)" == "win32-msvc2010" || "$(QMAKESPEC)" == "win32-icc"

perhaps, based on this if, it fails and trys another makefile which uses make instead of nmake. I would give it a try.

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

April 3, 2011

drago60000 drago60000
Lab Rat
6 posts

After some research I found out that the decision between make and nmake is part of the compiled configure.exe. The source code is part of the package and there you see that the decision depends on the name of the makespec. If it ends on msvc2005 (and some others), nmake is chosen, else make. Msvc2008 is not in there of course so it chooses make.

Probably one could now change the source code and rebuild the configure tool, but it is a Qt application so you need Qt to build it (sigh). Maybe I could have done this with Qt 4.7.x, but I decided to try something else.

I just configured Qt with the makespec msvc2005. The configuration part then is no problem, even with Studio 2010.

The next is calling nmake, that also seems no problem except there are messages about missing manifest files. A restart of nmake seems to fix that problem. Every message of this kind stops nmake and cannot be ignored (because it’s a fatal error?) with -I so I went the hard way and restarted nmake after each error of this kind (some 30 times…) and finally nmake was done.

I am not quite sure what my result is now. I have a compiled version 4.3.4. It is able to “unpack” my solution (i.e. build vcproj files from pro files) from command line but it produces some error messages on the way, but those could be a Windows 7 problem because they are environment warnings.

I have a Studio 2010 with the latest Qt integration version (1.1.8 I think). Trying to open the pro files from there resulted in a message that the Qt version is not supported by this integration version. On the other hand: older integration versions won’t do with Studio 2010 so I have now a mixture of versions.

However: I managed to build my Qt-application (the one I do this experiment for) with some minor problems (environmental). In the debugger I can see the content of e.g. QString, so the integration works at least partly. I did not try to use any other feature of the integration up to now.

For now I reached my goal at least for the main part. But some questions are still open. – Will the “wrong” qmakespec lead to a problem later on? – Which parts of the integration will be unusable? – Are there known problems generating vcproj files from “old” pro files under Windows 7? – What about those manifest errors during the Qt build?

If somebody has hints for these questions and maybe to the general idea using msvc2005 with studio 2010, I would really like to read it here ;-)

Drago

September 5, 2011

MarkSmit MarkSmit
Lab Rat
1 posts

Hi Gerolf,

I just set up version 4.5.2 for VS2010 with a little different approach. First I copied the specs from win32-msvs2008 to win32-msvs2010 and modified the file qmake.conf to use the correct _MSC_VER value (1600).

Then (unfortunately) I had to modify the file makefile.win32 at the folder qmake. At the top I had to add the VS2010 specs, just like you already described.

Then at the command line I ran configure.exe with at least the option “-make nmake” to be sure that nmake will be used (found the option in the source of configure.exe).
I even had to set the option “-no-qt3support” for building that part gave me an error and I do not need the Qt3 support.

After this I configure.exe did run almost correct, only copying qmake.exe failed. Copied this by hand and restarted configure.exe; then it completed normal.

Finally I could run nmake and build the library.

hope this helps,
Mark

 
  ‹‹ Installing 4.7.1 on Windows Server 2008 R2, folder is always READ-ONLY      How to have a project that can compile on multiple platforms ››

You must log in to post a reply. Not a member yet? Register here!