LEFEVRE Damien .net

1 2 3 4 5 6 7 8 >

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 =)

Wednesday 7 March 2012, 08:44

Install OpenGL headers on window

On my development PC I use VS2008 and 2010. I put the OpenGL headers in here:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\gl

The latest OpenGL extension headers can be downloaded from the OpenGL registry:

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:

Monday 26 September 2011, 09:42

VisualAssist + CUDA


  • Win7 Pro x64
  • VS2008
  • VS2010
  • CUDA 4.0
  • VisualAssist

To enable VisualAssist to work with CUDA I did the following:

  • Close all VisualStudio instances
  • Copy C:\Program Files (x86)\Visual Assist X\AutoText\Latest\Cpp.tpl to C:\Program Files (x86)\Visual Assist X\AutoText\Latest\Cu.tpl
  • Run VisualStudio once and close
  • From regedit, open HKEY_CURRENT_USER\Software\Whole Tomato\Visual Assist X\VANet9 (VS2008) and/or HKEY_CURRENT_USER\Software\Whole Tomato\Visual Assist X\VANet10 (VS2010)
  • Add ".cu;" to the ExtSource key
  • Add ".cuh;" to the ExtHeader key

Start VS again and you should be good to go!

Source: Cuda Forum

Tuesday 19 April 2011, 09:36

VisualStudio - Post build commands

A small syntax reminder for the copy post-build command I like to add on certain DLL projects.

Copy $(OutDir)\$(TargetName).lib %TARGET_DIR%
Copy $(OutDir)\$(TargetName).dll %TARGET_DIR%

1 2 3 4 5 6 7 8 >