PDA

View Full Version : Linking GLUT with QT



TheBogeyMan
10th October 2011, 17:42
Hi all,

I am trying to link GLUT with QT. I have seen some other threads, and I have questions about where to put the glut files. According to this guide about using GLUT with MinGW (http://oldwiki.mingw.org/index.php/Glut), where should I put the files? I am using QT 4.7.4., and my initial guess is that:

glut.h should go to C:\QtSDK\Desktop\Qt\4.7.4\mingw\include\GL (?)
glut32.lib should go to C:\QtSDK\Desktop\Qt\4.7.4\mingw\lib\ (?)
It says that glut32.dll should be located in the same directory where the project's executable will be created, and I have no idea where should that be.

Also I guess I should add the following line in the .pro file.

LIBS+=-lglut32

Any help would be appreciated.

wysota
10th October 2011, 18:41
You can place the files anywhere you want as long as you use INCLUDEPATH and LIBS QMake directives to point the locations to the compiler. This doesn't apply to the dll file which must be located where the runtime linker can find it (which for Windows is 1) the application binary directory, 2) %WINDIR%\System32, 3) %PATH% ).

http://www.google.com/search?q=placing+dll+files+on+windows