[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem compiling Opengl example with CYGWIN / OpenGL with EGCS



"Bourque, Gilles" wrote:

> I have tried to compile (make objs) the opengl bounce example with the
new
> fix for
> cygwin compiler and get the following error messages:
>
> g++ -c -O -I/cygnus/v/includew -o /cygnus/v/obj/gnuwin32/bncapp.o
bncapp.cpp
>
> In file included from \cygnus\v\includew\v/vbglcnv.h:20,
>                  from bnccnv.h:7,
>                  from bnccmdw.h:17,
>                  from bncapp.h:16,
>                  from bncapp.cpp:6:
> \cygnus\v\includew\GL/gl.h:1157: warning: `APIENTRY' redefined
>
C:\cygnus\CYGWIN~1\H-I586~1\bin\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..

> \..\..\..\i586-cygwin32\include\Windows32/Base.h:296: warning: this is
the
> location of the previous definition

The OpenGL headers are not a part of the cygwin or mingw32
distribution(*). The
OpenGL headers distributed with V came from the OpenGL headers that are
coming
with the SGI Dev. Kit with some bad hacks:I commented all the lines that

generated compilation errors, and took some advice from some news
answers and
from Mumut Khan ( see
http://www.cygnus.com/ml/gnu-win32/1997-Dec/0023.html )

The results are OpenGL headers where all the tesselation functions are
not
declared.
The new version of the cygwin (and if I can well remember of the egcs
dist too)
changed some stuff in Base.h.
Shortly,what you need to do to fix the problem is simply to edit the
gl.h lines
(around line #1157) by
#if !defined(WIN32)
#define WINGDIAPI
#define APIENTRY
#endif /* defined(WIN32) */

(if I could remember well, just put the #define APIENTRY line in the #if

!defined(WIN32) line).
If it does not work for you (meaning that you do not have any -DWIN32
flag in
your compilation command as it seems to be), simply comment the
#define APIENTRY line.
This should work even if it is not pretty at all!  (your error simply
means that
APIENTRY is already defined in the egcs headers, but this error should
not
result into an execution error).

(*)I am still wondering if "normal" (not hacked) OpenGL headers are
available
somewhere for the egcs distribution.
Does someone know something about that?

Mahnu


PS: sorry if you received this email twice, I get an error from the
desbian list server.


Reply to: