Compiling Glew with MinGW

Started by
3 comments, last by petersvp 12 years, 10 months ago
I am trying to use opengl shaders (glsl) in combination with a Qt application on Windows. To compile my Qt app I am using MinGW (I can't use Visual Studio express, because that's not supported by Qt); this means that I have to compile the Glew dll also with MinGW, doesn't it? If so, how do I do it? The Glew docs say that I have to use Cygwin, but isn't that a different compiler to MinGW which wouldn't work in combination with Qt? Second question: I use make (mingw32-make.exe). Which compiler does that use: mingw32-c++.exe, mingw32-g++.exe or mingw32-gcc.exe? Thanks.
Advertisement
On the MinGW pages you can find MSYS, a small shell that can be used to run compilation scripts (I also think you have to install script languages yourself, like ActivePerl and such). Check that out, its cake to use.
Quote:I can't use Visual Studio express, because that's not supported by Qt
It's not officially supported, but that doesn't mean you can't use it. I built Qt4.5 with VC++Express2008 and up to now I've had no problems with it.

Quote:The Glew docs say that I have to use Cygwin, but isn't that a different compiler to MinGW which wouldn't work in combination with Qt?
It has alredy been said, but one easy way is to grab MSYS and run make from there. Get the installer as it will help with setting the environment for you. As another option, get Codeblocks and import the VS project from there.

Quote:Second question: I use make (mingw32-make.exe). Which compiler does that use: mingw32-c++.exe, mingw32-g++.exe or mingw32-gcc.exe?
make invokes whatever command is specified in the makefile. When building, the usual way is to use g++.exe for C++ files and gcc.exe for C files.
What speaks against QtCreator, the IDE used and developed by the Qt-developers?
I already compiled GLEW to use with Qt Creator.

Qt Creator itself uses MingW.

To compile GLEW you will need MSYS. After you install MSYS, launch MSYS
Navigate to the folder where GLEW is (with cd)
Note about paths - if path is C:\c++\glew, tou must type in:
cd /c/c++/glew

then run "make" in there and it's OK. you can now install the *.a files in MinGW's bin

Note about Qt Creator's code completion don't like the GLEW's defines, and will not help. you will need function reference to write properly.

This topic is closed to new replies.

Advertisement