delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/09/18/18:52:23

From: garnerbc AT uclink2 DOT berkeley DOT edu (Garner Chung)
Subject: SGI's opengl and cygnus
18 Sep 1997 18:52:23 -0700 :
Message-ID: <3.0.3.32.19970918185115.0133d9d8.cygnus.gnu-win32@uclink2.berkeley.edu>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

I've been trying to compile some basic opengl programs using SGI's opengl
implementation.  I started out by creating .a files from the opengl.dll and
the glu.dll(not the opengl32.dll and the glu32.dll which are Microsoft's).

impdef opengl.dll > opengl.def
dlltool -k --def opengl.def --dllname opengl.dll --output-lib libopengl.a

But then I ran into a problem:
simpleci.o(.text+0xc33):simpleci.c: undefined reference to
`wglCreateContext AT 4'
simpleci.o(.text+0xc4b):simpleci.c: undefined reference to `wglMakeCurrent AT 8'
simpleci.o(.text+0xc7e):simpleci.c: undefined reference to `wglMakeCurrent AT 8'
simpleci.o(.text+0xc89):simpleci.c: undefined reference to
`wglDeleteContext AT 4'

But I soon realized that that was because of the "@NN"'s that are produced
due to the fact that the wgl* functions are standard calls.  So I removed
the "STDCALL"'s from the wgl* function declarations which are in
<Windows32/Function.h>.

Then I compiled again and got no errors.  But when I run the a.exe I
immediately get:

(f:\Cygnus\home\opengl\misc\a.exe 1444) In cygwin_except_handler
(f:\Cygnus\home\opengl\misc\a.exe 1444) Exception trapped!
(f:\Cygnus\home\opengl\misc\a.exe 1444) exception C0000005 at 24
(f:\Cygnus\home\opengl\misc\a.exe 1444) exception: ax 0 bx 240F238 cx 4 dx 0
(f:\Cygnus\home\opengl\misc\a.exe 1444) exception: si 240F224 di 401047 bp
FAD03
D4 sp 240F138
(f:\Cygnus\home\opengl\misc\a.exe 1444) exception is: STATUS_ACCESS_VIOLATION
(f:\Cygnus\home\opengl\misc\a.exe 1444) Stack trace:
(f:\Cygnus\home\opengl\misc\a.exe 1444) frame 0: sp = 0x240EF6C, pc =
0x1000CEC2

(f:\Cygnus\home\opengl\misc\a.exe 1444) frame 1: sp = 0x240EF88, pc =
0x77F94512

(f:\Cygnus\home\opengl\misc\a.exe 1444) frame 2: sp = 0x240EFAC, pc =
0x77F88EEB

(f:\Cygnus\home\opengl\misc\a.exe 1444) frame 3: sp = 0x240F038, pc =
0x77F76266

(f:\Cygnus\home\opengl\misc\a.exe 1444) In cygwin_except_handler
(f:\Cygnus\home\opengl\misc\a.exe 1444) Error while dumping state (probably
corrupted stack)

Any ideas?

garner
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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