LEFEVRE Damien .net

Sunday 3 June 2012, 01:16

Qt compilation flags


Add Jom to path if you prefer.

Open Visual Studio command prompt (32 or 64 bit) and/or in my case the Intel Parallel Studio one having the paths set for using the Intel Composer compiler. I'm not interested in building the examples nor demos when I build the libraries so I skip them with -nomake examples -nomake demos.

Go to source root directory and type

configure -nomake examples -nomake demos -opensource -platform win32-msvc2010
jom clean

The first command configures the build. The second one builds and take some hours. The third one is optional and used for cleaning up all un-necessary intermediate build files. It cuts down the full build with demo and examples from 10GB resulting source folder to 2GB. I don't know yet without the examples.

If you'd like to compile with Intel compiler use this configuration line:

configure -nomake examples -nomake demos -opensource -platform win32-icc

Still with the Intel compiler; I had a pre-SP1 Parallel Studio 2011 installed and the build failed there. The build completed after update to SP1. I hope the newer versions won't give troubles.

Thursday 22 March 2012, 21:36

Compile 64-bit Qt for Windows

I was a bit surprised to figure out that a Windows 64-bit version of Qt is not available for download, while it is for Linux and Mac...

Luckily for me I found a good Qt compilation tutorial. It's gona be building through the night, let see tomorrow =)

Tuesday 7 February 2012, 12:17

Qt + Visual Studio 2010: "CXX0030: Error: expression cannot be evaluated."

I got that error when working on a simple Qt app and found it impossible to do debugging since I could not visualize any of the objects.

It turned out that the C++ Optimization was set to /O2. So if you change that back to Disabled, debugging will be all good again.

  • Right click on your project, Properties
  • Expand Configuration Properties, C/C++, Optimization
  • For Optimization set "Disabled (/Od)"
  • Apply
  • Clean
  • Rebuild

I should do some research to confirm but it appear not to be a problem related to Qt at all but more of a C++ compiler option mismatch.

Tuesday 7 February 2012, 09:26

Qt setup + IntelliSense

To get IntelliSense and Qt debugging working properly on my development machine (x64) and VisualStudio 2010 I did the followinf steps.

;Qt Integration
QObject =classname=<staticMetaObject.d.stringdata,s> superclassname=<staticMetaObject.d.superdata->d.stringdata,s>
QString=<d->data,su> size=<d->size,u>
QByteArray=<d->data,s> size=<d->size,u>
QUrl =<d->encodedOriginal.d->data,s>
QUrlInfo =<d->name.d->data,su>
QPoint =x=<xp> y=<yp>
QPointF =x=<xp> y=<yp>
QRect =x1=<x1> y1=<y1> x2=<x2> y2=<y2>
QRectF =x=<xp> y=<yp> w=<w> h=<h>
QSize =width=<wd> height=<ht>
QSizeF =width=<wd> height=<ht>
QMap<*> =size=<d->size>
QVector<*> =size=<d->size>
QHash<*> =size=<d->size>
QVarLengthArray<*> =size=<s> data=<ptr>
QFont =family=<d->request.family.d->data,su> size=<d->request.pointSize, f>
QDomNode =name=<impl->name.d->data,su> value=<impl->value.d->data,su>
  • Then to stop IntelliSense winning you must add the following include directories to every project configurations: