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 ___glutset...@8
00000000 T ___glutinitwithe...@12
00000000 T ___glutget...@4
00000000 T ___glutcreatewindowwithe...@8
00000000 T ___glutcreatemenuwithe...@8
$ objdump -t /lib/w32api/libglut32.a | grep " ___glut"
[  7](sec  1)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000 ___glutset...@8
[  7](sec  1)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000 ___glutinitwithe...@12
[  7](sec  1)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000 ___glutget...@4
[  7](sec  1)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000
___glutcreatewindowwithe...@8
[  7](sec  1)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000
___glutcreatemenuwithe...@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/

Reply via email to