This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

glut (for X) cannot be compiled without -mno-cygwin


Hi,

I try to compile an X application using cygwin but I'm unable to compile a
simple test program using glut (it's my ./configure test):

#include <GL/glut.h>
int main()
{
        glutPostRedisplay();
        return 0;
}

Here is the output using option -H which shows the problem:

$ g++ -H -g -O2 -I/usr/X11R6/include main.cpp -lglut
. /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/GL/glut.h
.. /usr/X11R6/include/GL/gl.h
... /usr/X11R6/include/GL/glext.h
.... /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h
.. /usr/X11R6/include/GL/glu.h
/cygdrive/c/WINNT/TEMP/cc6QPFgw.o: In function `main':
/home/jens/Rhost/Rhost.trunk/build/main.cpp:5: undefined reference to `_glutPostRedisplay'
collect2: ld returned 1 exit status

The references to w32api/GL are probably wrong!
Once I omit -I/usr/X11R6/include (or use -mno-cygwin) it works:

$ g++ -H -g -O2 main.cpp -lglut
. /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/GL/glut.h
.. /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/GL/gl.h
.. /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/GL/glu.h
... /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h

Since I want to build an X application I do not want to use w32api/GL or
-mno-cygwin! Any idea?

PS: Please CC: me.

Jens

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]