compiling Mesa on egcs Mingw32

Stephane Cateland cateland@adersa.asso.fr
Tue Sep 1 03:19:00 GMT 1998


Hi 

I am trying to get Mesa and GLUT up and running on mingw32 environment.
I succeed compiling it (and linking) 
but the major problem glut steel net working. 
It compilrt OK but need attention: 
  in glut.h  in win32 ifdef case  you should have something like this: 
----------------------------------------------------------------------------------------------- 
#if defined(__CYGWIN32__) || defined(__MINGW32__) 
#  define GLUTCALLBACK  
#  define GLUTAPI extern 
#else 
#  define GLUTCALLBACK __cdecl 

#  if defined(BUILD_GLUT32) 
#	define GLUTAPI __declspec(dllexport) 
#  elif defined(_DLL) 
#	define GLUTAPI __declspec(dllimport) 
#  else 
#	define GLUTAPI extern 
#  endif 

#  pragma warning (disable:4244)	/* Disable bogus conversion warnings. 
 */ 
#  pragma warning (disable:4305)  /* VC++ 5.0 version of above warning. */ 
#endif 
this because gnuwin32 behave as unix for declaring extern function. 

Now you should remove call to joystick stuff in glut_input.c and glut_joy.c  
singe gnuwin32 does not have the header files for this.  
similarly in glut_console.c there is a undefine constant  ???FULLSCREEN  
i ended up doing as for joystick #ifdefining code. 

the makefile are quike out of date you should use similar make as cygnus  
one but includeing all c file enumerated in the last part of  
WIN32/MESAGLUT.DSP 

so then OK you get it compiling you generate a libglut.a  

then in demo when you compole every thing goes smooth (execp if in GL  
sources you let CopyMemory as win32 function, it should be defined as  
memcpy).  

Now running it. it does not blow up but as  for mesa-2.6 it failed and cant get  
pixel with necessary capabilities message.  
on the other hand osmesa demo just work fine. thus gl library are OK .

OK I took a look on that and invistigated the problem (although I didnot
solved it I found a problem)
 take a look at thist test.c  which does the initialisation stuff  glut is
 doing 
(all GLUT data structure handling is removed  I only keep call to relevant
functions). 

THEN i found that ChoosePixelFormat failed sayin that module can't be
loaded (GetLastError)  Thus I assumed I got a problem may be my set up 
may
be a more subtle thing 

If any one can have a look at this test program to see what happen ??? I
tried it on visual C (on the same machine and it failed, with the same
diagnostic)

Please HELP.

thank you. 
Stef.


//////////////////////////////////////////////////
//
// Stephane Cateland <cateland@adersa.asso.fr>
//
//   Adersa  10 rue de la croix Martre   
//   91873 Palaiseau cedex    FRANCE
//
//   Phone   [switchboard]   (33) 0 160 135 353
//   Fax                     (33) 0 169 200 563 
//
//////////////////////////////////////////////////
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-c
Size: 9989 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/19980901/90ae6027/attachment.bin>


More information about the Cygwin mailing list