This is the mail archive of the
cygwin
mailing list for the Cygwin project.
opengl-1.1.0-10 glut32 linking problems
- From: Reini Urban <rurban at x-ray dot at>
- To: The Cygwin Mailing List <cygwin at cygwin dot com>
- Date: Wed, 28 Jan 2009 23:51:33 +0100
- Subject: opengl-1.1.0-10 glut32 linking problems
The importlib /usr/lib/w32api/libglut32.a has some problems. Linking
to the dll directly works fine.
$ cat test.c
#include <stdio.h>
#include <stdlib.h>
#include <GL/glut.h>
int main(int argc, char *argv[])
{
if(glutInit == NULL) {
printf("glutInit is NULL\n");
return EXIT_FAILURE;
}
printf("GLUT %d\n", GLUT_API_VERSION);
return EXIT_SUCCESS;
}
$ gcc test.c -lglut32 -lglu -lopengl32
undefined reference to `___glutInitWithExit'
undefined reference to `___glutCreateWindowWithExit'
undefined reference to `___glutCreateMenuWithExit'
$ gcc test.c /bin/glut32.dll -lglu -lopengl32
$ ./a
GLUT 3
Note that there are two more ___glut* functions, not only these three.
$ nm /lib/w32api/libglut32.a | grep " ___glut"
00000000 T ___glutSetFCB@8
00000000 T ___glutInitWithExit@12
00000000 T ___glutGetFCB@4
00000000 T ___glutCreateWindowWithExit@8
00000000 T ___glutCreateMenuWithExit@8
$ objdump -t /lib/w32api/libglut32.a | grep " ___glut"
[ 7](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 ___glutSetFCB@8
[ 7](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 ___glutInitWithExit@12
[ 7](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 ___glutGetFCB@4
[ 7](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000
___glutCreateWindowWithExit@8
[ 7](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000
___glutCreateMenuWithExit@8
I see nothing problematic, but I'm no expert
--
Reini Urban
http://phpwiki.org/ http://murbreak.at/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/