views:

1270

answers:

2

My initial goal was to get Qt Creator and Visual Studio 2008 to create compatible libraries, so what I've done so far was open a VS command prompt, go to my Qt folder and then run configure.exe followed by nmake to recompile the Qt libraries with VS. The problem is that now Qt creator won't compile anything. The compiler output shows that it is now using cl instead of gcc, which is what I wanted, but anytime I try to compile anything I get the following warnings:

:-1: warning:  unrecognized option '/MANIFEST'; ignored
:-1: warning:  unrecognized option '/MANIFESTFILE:debug\HelloQt.intermediate.manifest'; ignored
:-1: warning:  unrecognized option '/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*''; ignored

I'm not sure if it makes a difference, but when I ran configure.exe I didn't set any command line parameters. I've noticed that references I've found have use different command line parameters when running configure.exe (although no two references use the same parameters), I'm not sure if running it from a VS command line was enough or if I was supposed to manually set some options.

This website uses a very long command line for configure.exe

configure -no-sql-sqlite -no-qt3support -no-opengl -platform win32-msvc2005 -no-libtiff -no-dbus -no-phonon -no-phonon-backend -no-webkit

although it appears he's disabling some options that I will need for my projects, and he didn't run it from a VS command prompt.

*EDIT: recomplied with the -platform win32-msvc2008 parameter for configure.exe and it made no difference

My question is, what should I do about these "unrecognized options," and more generally is there anything else I need to do to get Qt creator to compile Qt projects with cl?

UPDATE So I've tried recompiling the Qt libraries and upon actually reading the output from the 45+ minutes of compilation, I see that nmake is exiting with an error. I get eight "unresolved external symbol" errors from QNetworkReplyHandler.obj and FrameLoaderClientQt.obj before the compilation process is aborted. This doesn't seem like it would be causing the unrecognized option errors I've been receiving but it explains why the Qt libraries seem to run buggy when I'm using them with the Visual Studio Qt Plug-in. This problem is relatively unrelated so I've posted it in another question, here is the link just in case anyone has an answer for that problem.

A: 

The goal is to ensure you have a properly compiled QTDIR. In your case one for VS and one for gcc (if you want the two).

Depending on what you downloaded Qt Creator uses gcc but you can specify alternative QT directories under Options > Qt4 > Qt Versions. The path and version will show in the dialog box.

1) Go to the VS command line and run configure.exe & nmake with a clean source repository. Then add this QTDIR to you Qt Creator. I suggest you run make clean before.

2) Then make sure qmake and nmake can be run from the Qt commandline without errors. You should have a Qt Command line icon installed if you used Qt installer. If not, make sure you have QTDIR environment variable set, with %QTDIR%/bin in the path.

3) Do step 1 again, but this time do not use VS but make sure gcc is in the path. Run configure.exe etc again but in a separate directory specially for gcc. Add this version to your Qt Creator.

4) When compiling your project, run qmake first. You can change Qt versions, but do not forget to run qmake.

Hope this helps.

Derick
A: 

also, remember that QT Creator does not support debugging using CL

-- Lior

Lior