PDA

View Full Version : Problems with Win32 and Linux



urthen
01-23-2007, 05:41 PM
Apparently either I am completely retarded or this is completely obfuscated. Where on earth do I download the .h and .lib files, or even the source itself, for win32 opengl? I found it for linux after (A LOT) of searching, but I cant find anything for windows. I can find PLENTY of glut implementations, but nothing with the underlying GL.

I have searched literally ALL DAY. Nothing has come up. I tried using MesaLib on both windows and linux. On Windows, the Makefile includes references to several things that dont exist in windows, like ls, and I dont know enough how to fix it. The VC7 project is riddled with errors that I can only assume are generated from me doing something wrong, but as usual it seems like I am the first one to ever have these things happen to me.

Some of the errors from Visual Studio:
C:\MesaLib-6.5.2\Mesa-6.5.2\src\mesa\shader\arbprogparse.c(3706): error C2054: expected '(' to follow '__extension__'
C:\MesaLib-6.5.2\Mesa-6.5.2\src\mesa\shader\arbprogparse.c(3826): error C2065: 'core_grammar_text' : undeclared identifier
C:\MesaLib-6.5.2\Mesa-6.5.2\src\mesa\shader\arbprogparse.c(3706): error C2085: 'core_grammar_text' : not in formal parameter list
C:\MesaLib-6.5.2\Mesa-6.5.2\src\mesa\shader\arbprogparse.c(3706): error C2143: syntax error : missing ';' before '='


In Linux, I am using FreeGlut, and everything compiles correctly, but every program I run provided by my professor spews out this error:
freeglut (./ifs): ERROR: Internal error <Visual with necessary capabilities not found> in function fgOpenWindow
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 4 (X_DestroyWindow)
Resource id in failed request: 0x0
Serial number of failed request: 16
Current serial number in output stream: 19

I googled the error but nothing concise popped up, lots of people seemed to have the error in all walks of programming but never a solution that worked for me.

My Windows box is Windows XP and my linux box is Ubuntu Dapper 64bit.

Does life just hate me or does someone know what I am doing wrong?

Stephen A
01-24-2007, 01:54 AM
http://opengl.org/registry/

Download glext.h from there. "gl.h" should be come with your compiler (but you can always download it if not).

Under windows you link with opengl32, under linux with libgl - which should also be provided by your copmiler. These liraries will act as proxies to the real driver (.dll or .so) which you should already have (you have installed the drivers for your gfx card, right?) You only need to download mesa yourself if no drivers exist for your card.

Download the headers, install your drivers, and you are good to go.

songho
01-24-2007, 06:10 AM
Originally posted by urthen:

Some of the errors from Visual Studio:
C:\MesaLib-6.5.2\Mesa-6.5.2\src\mesa\shader\arbprogparse.c(3706): error C2054: expected '(' to follow '__extension__'
C:\MesaLib-6.5.2\Mesa-6.5.2\src\mesa\shader\arbprogparse.c(3826): error C2065: 'core_grammar_text' : undeclared identifier
C:\MesaLib-6.5.2\Mesa-6.5.2\src\mesa\shader\arbprogparse.c(3706): error C2085: 'core_grammar_text' : not in formal parameter list
C:\MesaLib-6.5.2\Mesa-6.5.2\src\mesa\shader\arbprogparse.c(3706): error C2143: syntax error : missing ';' before '='
This error can be resolved by replacing "__extension__" to "LONGSTRING" in arbprogparse.c(3706). But you may encounter other problems after that :(