utorak, 14. listopada 2008.

Qt in VS 2005

This ain't Ubuntu but I preffer VS as development enviroment, so I'm gonna post here a few notes on how to install it for the next time I forget to do half of it and am wondering wth went wrong...

After downloading the free version yadda yadda yadda from http://trolltech.com/, unpacking the thing and so on:

  • add path to Qt folder to enviroment variable PATH; usually C:\Qt\4.4.0 or something
  • Open Visual Studio Command Prompt, get into C:\Qt\4.4.0
Then, in VS, run:

configure -platform win32-msvc2005 -static -debug-and-release -fast -qt-sql-sqlite -no-qt3support -vcproj

for a static build. This allows you to build projects with static libraries, meaning it's gonna work on every platform without Qt pre-installed on the comp. In case you need a dynamic build:

configure -platform win32-msvc2005 -debug-and-release -fast -qt-sql-sqlite -no-qt3support -vcproj

The dynamic build is going to be required if you're gonna use external widgets and other Qt stuff. With free version of Qt, these won't work with a static build. (pah.)

After that finishes, just run

nmake

If something went wrong, nmake -clean or nmake -confclean.

For enabling Visual Assist, go to VS IDE, VAssistX->Visual Assist X Options->C/C++ Directories
and add paths to: C:\Qt\4.4.0\src and C:\Qt\4.4.0\include. Change platform to Custom.


Should work (on x86). Still struggling with x64... :(

More help on:

General Qt Installation:
http://doc.trolltech.com/4.4/installation.html

Visual Assist X integration:
http://www.qtcentre.org/forum/f-qt-programming-2/t-visual-assist-x-and-qt-6870.html

Nema komentara: