PDA

View Full Version : Help with library .a -> .lib in glut!!!



dögun
05-21-2003, 09:04 AM
hello.
Ive installed MinGw under windows (its like cygwin, for those who do not know what it is) and iam using it to compile C/C++ code. The problem is that iam using GLUT and when i compile the .o files i get undefined reference to all glut functions! i think the problem is that its not using the file glut32.lib cause mingw uses .a files for a library.... how cant i correct this? is there a version of glut with .a files for library?

JML

mikael_aronsson
05-21-2003, 09:22 AM
Hi !

First of all cygwin is an emulation layer for unix, so it tries to emulate unix on Windows, MinGW on the other hand is not a unix emulation layer, it's actually run on Microsoft's msvcrt library, just wanted to point that out.

If you have a modern installation of MinGW you should be able to use .lib files without any problems.

Mikael

nexusone
05-21-2003, 09:53 AM
I use DEV-C IDE which comes with the mingw compiler.

Now DEV-C (FREE GUI interface) comes with all the openGL library files in .a format, including glut.

When compiling are you linking the librarys.

-lopengl32 -lglu32 -lglut32

look in the lib directory for the following files:

libopengl32.a
libglu32.a
libglut32.a

If you don't have them drop me an e-mail and I will send what ever file you need.



Originally posted by dögun:
hello.
Ive installed MinGw under windows (its like cygwin, for those who do not know what it is) and iam using it to compile C/C++ code. The problem is that iam using GLUT and when i compile the .o files i get undefined reference to all glut functions! i think the problem is that its not using the file glut32.lib cause mingw uses .a files for a library.... how cant i correct this? is there a version of glut with .a files for library?

JML

dögun
05-21-2003, 10:22 AM
lol, each time u answer something nice =)) ive searched for that DEV-C IDE but i havent found it, is it in the http://www.mingw.org home site??

dögun
05-21-2003, 10:30 AM
found it, thanks to both, ill try to continue =)

dögun
05-21-2003, 11:40 AM
Now i get undefined reference to __gxx_personality_v0 !!! have no idea what this is....

Compiling with:

gcc -o $(exec) $(objects) -L -lglu32 -lglut32 -lopengl32

dögun
05-21-2003, 11:44 AM
ok for i was missing the -lstdc++ flag, no idea what it does, but it works. Thanks people

nexusone
05-21-2003, 02:06 PM
Here is the link for DEV-C++
http://www.bloodshed.net/devcpp.html


Also on my website have how to set it up:
www.angelfire.com/linux/nexusone/ (http://www.angelfire.com/linux/nexusone/)




Originally posted by dögun:
lol, each time u answer something nice =)) ive searched for that DEV-C IDE but i havent found it, is it in the http://www.mingw.org home site??



[This message has been edited by nexusone (edited 05-21-2003).]

mikael_aronsson
05-21-2003, 09:51 PM
Hi !

If you use g++ instead of gcc when you compile it will work without the flag (g++ does it for you)

Mikael