delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/03/18/11:42:44

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Tue, 18 Mar 2003 11:42:01 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Paul Sargent <Paul DOT Sargent AT 3dlabs DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Header problem with OGL on Cygwin
In-Reply-To: <20030318155107.GA19017@3dlabs.com>
Message-ID: <Pine.GSO.4.44.0303181139490.561-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

On Tue, 18 Mar 2003, Paul Sargent wrote:

> Thanks for the sample app Andre, that compiled fine. That showed me it
> wasn't a system issue, so resolved to dig a bit more. I've made some headway
> although I'm not sure I understand it.
>
> Basically it seems to boil down to the order that I'm including header files
> in my source files.
>
> I'm using the glpng library <http://www.wyatt100.freeserve.co.uk/download.htm>
> to load textures. If I "#include" the glpng header file before reading in the
> standard gl.h and glut.h files then the symbols in my object files change
> from the '_glBegin AT 4' style to the '_glBegin' style.
>
> I've attached the glpng.h header to this mail (it's pretty small). If
> anybody can teach me why this header changes the behaviour of the standard
> GL headers I'd appreciate the education.
>
> I'm now getting segmentation violations when I run the thing, but that's my
> problem.
>
> Thanks
> Paul

Paul,

Here's your culprit:

/* XXX This is from Win32's <windef.h> */
#ifndef APIENTRY
        #if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
                #define APIENTRY    __stdcall
        #else
                #define APIENTRY
        #endif
#endif

This screws up a similar chunk of code in the standard Cygwin w32api
include files (which check for a slightly more liberal condition than
just the MSC version).
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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