This is the mail archive of the cygwin mailing list for the Cygwin 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]

can't compile opengl using w32api with gcc


Hi-

I've been trying to compile the Perl OpenGL
module for cygwin using the w32api opengl32,
glu32,.. for performance.  I used to be able
to add either -I/usr/X11R6/include or
-I/usr/include/w32api to the gcc flags to
get the compile to work.

Going back with cygwin 1.7.1 now, I am unable to
get the w32api compile to work.  After some
debugging, the problem is that /usr/include/w32api
is in the gcc system headers list.  As a result,
duplicate -Idir flags are discarded and since both
/usr/include and /usr/include/w32api are in the
system search path (in that order), the compile
*always* picks up the gl.h in /usr/include/GL
which is the Mesa one.

I was able to get the compile to work by using
the -isystem flag instead of -I as the gcc
option but now I have a compiler-specific flag
that I have to track.  Are there any other
options here?

Thanks much,
Chris

P.S.  It turns out the previous use of flags
had the same problem but since the X11/Mesa
GL include files were in /usr/X11R6/include
and not /usr/include, the duplicate use of
-I/usr/include/w32api was ignored but that
was the one being pulled in by the default
search.  Then when I put -I/usr/X11R6/include
on the compile, it did get added to the
header search path since it was not in the
gcc system paths by default.

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


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