public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* No extern "C" for XFree86 OpenGL headers
@ 2003-11-06  2:43 Tron Thomas
  2003-11-06  5:24 ` Harold L Hunt II
  0 siblings, 1 reply; 2+ messages in thread
From: Tron Thomas @ 2003-11-06  2:43 UTC (permalink / raw)
  To: cygwin-xfree

The XFree86 versions of the OpenGL headers files do not use extern "C" 
when compiling C++ modules.  This can result in linking errors as OpenGL 
function receive decorated signatures that won't exist in the libraries.

A work around is for a developer to do something like the following in a 
C++ code module:
#ifdef __cplusplus
extern "C" {
#include <GL/gl.h>
}
#endif

which shouldn't normally be necessary as other implementations of OpenGL 
do not require this.




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: No extern "C" for XFree86 OpenGL headers
  2003-11-06  2:43 No extern "C" for XFree86 OpenGL headers Tron Thomas
@ 2003-11-06  5:24 ` Harold L Hunt II
  0 siblings, 0 replies; 2+ messages in thread
From: Harold L Hunt II @ 2003-11-06  5:24 UTC (permalink / raw)
  To: cygwin-xfree

This is out of the blue.  Could you give a little more context to what 
you are trying to do?

Harold

Tron Thomas wrote:

> The XFree86 versions of the OpenGL headers files do not use extern "C" 
> when compiling C++ modules.  This can result in linking errors as OpenGL 
> function receive decorated signatures that won't exist in the libraries.
> 
> A work around is for a developer to do something like the following in a 
> C++ code module:
> #ifdef __cplusplus
> extern "C" {
> #include <GL/gl.h>
> }
> #endif
> 
> which shouldn't normally be necessary as other implementations of OpenGL 
> do not require this.
> 
> 
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-06  5:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-06  2:43 No extern "C" for XFree86 OpenGL headers Tron Thomas
2003-11-06  5:24 ` Harold L Hunt II

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).