delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/10/17/18:46:18

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=3.9 required=5.0 tests=AWL,BAYES_40,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Message-ID: <4CBB7CB3.6030701@gmail.com>
Date: Sun, 17 Oct 2010 18:46:11 -0400
From: chm <devel DOT chm DOT 01 AT gmail DOT com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: can't compile opengl using w32api with gcc
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019