From: Keith MARSHALL <keith.marshall@to...> - 2004-08-20 12:43:28
> You headers appear to be in the wrong place. The path should be
> Darrell Blake wrote:
>> I've just installed Msys and Mingw in Windows because I'm wanting to
>> port my SDL game to Windows. I installed Msys and Mingw as normal and
>> added mingw to my msys fstab and then I untarred the SDL source did
>> "./configure --prefix=/mingw && make && make modules install".
>> I can compile normal SDL programs fine but when it comes to a program
>> using OpenGL I get an error like "Can't find -LGL" or "Can't find
>> -GL". I'm compiling the program like "g++ program.cpp -o program -lGL
>> -lGLU `sdl-config --cflags --libs`". I know normally that this mean I
>> havn't got the OpenGL libraries or headers installed but in
>> /usr/include/GL there exists gl.h, glu.h and glext.h so I know it's
>> not the headers. I've had a look for libgl.so which is what I think
>> the file I need is but I can't find it. In /usr/lib there are lots of
>> .a files one of which I believe is libglext.a or something like that
>> but there isn't a libgl.a.
Notwithstanding the headers in the wrong place, the error message would
seem more indicative of missing libraries.
The g++ options "-lgl" and "-lglu" call for libraries called "libgl.a"
and "libglu.a", in the default library path; if these are missing, the
link will fail.
Searching for "libgl.so" on Windows is doomed to fail -- Windows calls
"shared object libraries" "dynamic link libraries", and uses the suffix
".dll", rather than ".so". So, if you have "libgl.dll" and "libglu.dll",
then these should provide the functionality you require.