Subject: compiling Mesa on egcs Mingw32
From: [email-masked] (Stephane Cateland)

1 Sep 1998 11:30:51 -0700
Message-ID: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: Multipart/Mixed; boundary=Message-Boundary-2647
To: [email-masked]
X-Unparseable-Date: Tue, 1 Sep 1998 09:55:12 100

--Message-Boundary-2647
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body

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 <[email-masked]>
//
//   Adersa  10 rue de la croix Martre   
//   91873 Palaiseau cedex    FRANCE
//
//   Phone   [switchboard]   (33) 0 160 135 353
//   Fax                     (33) 0 169 200 563 
//
//////////////////////////////////////////////////

--Message-Boundary-2647
Content-type: text/plain; charset=US-ASCII
Content-disposition: inline
Content-description: Attachment information.

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  test.c
     Date:  1 Sep 1998, 9:42
     Size:  9989 bytes.
     Type:  Program-source

--Message-Boundary-2647
Content-type: Application/Octet-stream; name="test.c"; type=Program-source
Content-disposition: attachment; filename="test.c"
Content-transfer-encoding: BASE64

--Message-Boundary-2647--
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".