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]

RE: OpenGL-1.1.0 compile problem in cygwin-1.7


Thanks Brian,

  the problem was I was using a gcc 4.3.0 which I guess somehow I didn't install correctly.
$ /usr/local/bin/g++ -v
gcc version 4.3.0 20071101 (experimental) (GCC)

I just swithced over to /usr/bin/g++ and it worked great.

But now I ran into another problem.  I can't compile this short code using
/usr/include/opengl/GL:

#include <GL/gl.h>
#include <GL/glu.h>
void test (void)
{
  GLUtesselator *tobj = (GLUtesselator *)gluNewTess();

  gluTessCallback(tobj, (GLenum)GLU_BEGIN, (void (*)())glBegin);
  gluTessCallback(tobj, (GLenum)GLU_END, (void (*)())glEnd);
  gluTessCallback(tobj, (GLenum)GLU_VERTEX, (void (*)())glVertex2fv);
}

$ /usr/bin/g++ -g -c -I/usr/include/opengl test.c++
x.c++: In function `void test()':
x.c++:7: error: invalid conversion from `void (*)()' to `void (*)()'
x.c++:7: error:   initializing argument 3 of `void gluTessCallback(GLUtesselator*, GLenum, void (*)())'
x.c++:8: error: invalid conversion from `void (*)()' to `void (*)()'
x.c++:8: error:   initializing argument 3 of `void gluTessCallback(GLUtesselator*, GLenum, void (*)())'
x.c++:9: error: invalid conversion from `void (*)()' to `void (*)()'
x.c++:9: error:   initializing argument 3 of `void gluTessCallback(GLUtesselator*, GLenum, void (*)())'

But I can compile it if I use the /usr/X11R6/include/GL:

$ /usr/bin/g++ -g -c -I/usr/X11R6/include test.c++
$

Do you know what the problem is?

Thank you,

Linh

-----Original Message-----
From: cygwin-xfree-owner@cygwin.com [mailto:cygwin-xfree-owner@cygwin.com] On Behalf Of Brian Dessent
Sent: Monday, December 08, 2008 2:53 PM
To: cygwin-xfree@cygwin.com
Subject: Re: OpenGL-1.1.0 compile problem in cygwin-1.7

"Phan, Linh H" wrote:

> /usr/include/sys/_types.h:63:20: error: stddef.h: No such file or directory
> In file included from /usr/lib/../include/w32api/glui.h:29,
>                  from example1.cpp:20:
> /usr/include/stdio.h:37:20: error: stdarg.h: No such file or directory
> In file included from /usr/include/sys/reent.h:14,
>                  from /usr/include/string.h:11,
>                  from example1.cpp:18:
> /usr/include/sys/_types.h:72: error: 'wint_t' does not name a type
> In file included from example1.cpp:18:
> /usr/include/string.h:22: error: 'size_t' has not been declared

stddef.h and stdarg.h aren't part of Cygwin and they don't live in
/usr/include.  They are provided by the compiler and they should be
found in the compiler's private include directory,
$libdir/gcc/$target/$version/include.  If it's not found you have an
installation problem with gcc.  Try the following to verify:

$ echo "#include <stdarg.h>" | gcc -x c - -H -E -o /dev/null
. /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stdarg.h

Brian

--
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/


--
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]