Notes on the QGLViewer

Easy installation and usage for Visual Studio 2005 (8)

I assume that you have installed Qt for Visual Studio, either with a commercial license or with patched open source version (see here).

To install libQGLViewer Download the latest version of the installer below. Double click on the downloaded file. It should run an installer (thanks to Nullsoft free installer!) that:

Filename Size Last modified
libQGLViewer-2.2.4-1-setup-v0.exe 1.7 Mb December 26th 2006

Get all files in a single click by selecting the commands below and pasting them in a shell.


Yes, you read well, the library can be duplicated to up to 3 different places, and the headers up to 2 times. That may sounds unefficient, but that's the best compromise I have found. Indeed, copying to System32 is necessary for application to run. Alternative is that the user (or the installer) add QGLViewer to its path, but I find this too intrusive. Another alternative is to bake the path to the library in the executable, similarly to gcc -Wl,"rpath=..." directive, but I cannot find any equivalent in Windows. Then the application is copied in Visual Studio lib so that linker finds it without changing the properties of the project and without declaration in the .pro file. Alternatives would be that the user indicates the location of the headers and libraries in the .pro file, but I find it tedious. Another alternative would be to install a .prf file with the information. Then the user (or the installer) would define/extend the QMAKEFEATURES variable to point to that location. Alternatively, it could locate the Qt feature directory and install it there. This solution is under discussion with Gilles Debunne.


In your .pro file, add:

CONFIG(debug,debug|release) {
	LIBS *= -lQGLViewerd2
CONFIG(release,debug|release) {
	LIBS *= -lQGLViewer2

Then generate the Visual Project (run qmake -tp vc on the .pro file, for example from a Visual Studio prompt). That's it! You can compile and execute!

Other versions of Visual Studio

If you have another version of Visual Studio, you can help me improve the installer to detect it! Search you registry to find which key contains the path to you visual studio installation directory. For visual studio it is HKLM "Software\Microsoft\Visual Studio\8.0\Setup\VC". Then send me this information and I'll contact you in return to test the installer (I cannot have all Studio versions on my windows machine).