Problems compiling SDLgears (newbie)

I’ve just installed cygwin and got SDL running fine, but I can’t get any
OpenGL programs to compile.

When I configure SDLgears, everything comes out fine, but when I make, I get
the following.

gcc -DPACKAGE=“SDLgears” -DVERSION=“1.0.2” -I. -I. -g -02 -I/usr/loca
l/include -I/usr/local/include/SDL -Dmain=SDL_main -I/usr/include/mingw -DWI
N32 -Uunix -c SDLgears.c
gcc -g -02 -I/usr/local/include -I/usr/local/include/SDL -Dmain=SDL_main
-I/usr/include/mingw -DWIN32 -Uunix -o SDLgears

SDLgears.o -L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows -mno-cygwin
-lGL
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/…/…/…/…/i686-pc-cygwin/bin/ld:
cannot find -lGL
collect2: ld returned 1 exit status
make: *** [SDLgears ] Error 1

(Sorry, I’m still new at this)
/usr/include/mingw/GL is there, I checked it.

If anybody can offer any help, I’d appreciate it. I’m hoping to get back to
programming games after being out of practice for a long time.

Thanks in advance.

Madcat13

Try running ldconfig (as root)

-Jordan Wilberding>From: “MadCat13”

Reply-To: sdl at lokigames.com
To: sdl at lokigames.com
Subject: [SDL] Problems compiling SDLgears (newbie)
Date: Tue, 10 Jul 2001 21:27:11 -0700
Received: from [63.80.144.67] by hotmail.com (3.2) with ESMTP id
MHotMailBD1527520086400438883F50904308A40; Tue, 10 Jul 2001 21:55:47 -0700
Received: (from majordom at localhost)by mail.lokigames.com (8.9.3/8.9.3) id
VAA02737for sdl-outgoing; Tue, 10 Jul 2001 21:27:12 -0700
Received: from ftp.lokigames.com (user80.lokigames.com [63.80.144.80])by
mail.lokigames.com (8.9.3/8.9.3) with ESMTP id VAA02734for
; Tue, 10 Jul 2001 21:27:08 -0700
Received: (from news at localhost)by ftp.lokigames.com (8.9.3/8.9.3) id
VAA31580for sdl at lokigames.com; Tue, 10 Jul 2001 21:27:11 -0700
From owner-sdl at lokigames.com Tue, 10 Jul 2001 21:56:59 -0700
Message-Id: <200107110427.VAA31580 at ftp.lokigames.com>
X-Resend: news
Sender: owner-sdl at lokigames.com
Precedence: bulk

I’ve just installed cygwin and got SDL running fine, but I can’t get any
OpenGL programs to compile.

When I configure SDLgears, everything comes out fine, but when I make, I
get
the following.

gcc -DPACKAGE=“SDLgears” -DVERSION=“1.0.2” -I. -I. -g -02
-I/usr/loca
l/include -I/usr/local/include/SDL -Dmain=SDL_main -I/usr/include/mingw
-DWI
N32 -Uunix -c SDLgears.c
gcc -g -02 -I/usr/local/include -I/usr/local/include/SDL -Dmain=SDL_main
-I/usr/include/mingw -DWIN32 -Uunix -o SDLgears

SDLgears.o -L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows -mno-cygwin
-lGL
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/…/…/…/…/i686-pc-cygwin/bin/ld:
cannot find -lGL
collect2: ld returned 1 exit status
make: *** [SDLgears ] Error 1

(Sorry, I’m still new at this)
/usr/include/mingw/GL is there, I checked it.

If anybody can offer any help, I’d appreciate it. I’m hoping to get back
to
programming games after being out of practice for a long time.

Thanks in advance.

Madcat13


Get your FREE download of MSN Explorer at http://explorer.msn.com

Cygwin doesn’t really use ldconfig since it’s not UN*X based but
WIN32 based. Cygwin uses GLut for GL stuff (If I’m correct!) and
it’s indeed installed in /usr/include/mingw. I think there’s a
GL.dll in that directory also.

I think you should look at the testgl application in SDL’s source
test directory. A simple cut and paste gave me the following :

gcc -g -O2 -I/usr/local/include -I/usr/local/include/SDL
-Dmain=SDL_main -I/usr
/include/mingw -DWIN32 -Uunix -DHAVE_OPENGL -o testgl testgl.o
-lopengl32 -L/
usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows -mno-cygwin

So it’s not -lGL but -lopengl32. Try changing that.

Try it, I think’ll it works :slight_smile:

Regards,

Niels Wagenaar
NeoPocott/SDL and BoyCott Advance/SDL author> -----Oorspronkelijk bericht-----

Van: reter7 at hotmail.com [mailto:reter7 at hotmail.com]
Verzonden: woensdag 11 juli 2001 8:18
Aan: sdl at lokigames.com
Onderwerp: Re: [SDL] Problems compiling SDLgears (newbie)

Try running ldconfig (as root)

-Jordan Wilberding

From: “MadCat13”
Reply-To: sdl at lokigames.com
To: sdl at lokigames.com
Subject: [SDL] Problems compiling SDLgears (newbie)
Date: Tue, 10 Jul 2001 21:27:11 -0700
Received: from [63.80.144.67] by hotmail.com (3.2) with ESMTP id
MHotMailBD1527520086400438883F50904308A40; Tue, 10 Jul 2001
21:55:47 -0700
Received: (from majordom at localhost)by mail.lokigames.com
(8.9.3/8.9.3) id
VAA02737for sdl-outgoing; Tue, 10 Jul 2001 21:27:12 -0700
Received: from ftp.lokigames.com (user80.lokigames.com
[63.80.144.80])by
mail.lokigames.com (8.9.3/8.9.3) with ESMTP id VAA02734for
; Tue, 10 Jul 2001 21:27:08 -0700
Received: (from news at localhost)by ftp.lokigames.com (8.9.3/8.9.3) id
VAA31580for sdl at lokigames.com; Tue, 10 Jul 2001 21:27:11 -0700
From owner-sdl at lokigames.com Tue, 10 Jul 2001 21:56:59 -0700
Message-Id: <200107110427.VAA31580 at ftp.lokigames.com>
X-Resend: news
Sender: owner-sdl at lokigames.com
Precedence: bulk

I’ve just installed cygwin and got SDL running fine, but I
can’t get any
OpenGL programs to compile.

When I configure SDLgears, everything comes out fine, but
when I make, I
get
the following.

gcc -DPACKAGE=“SDLgears” -DVERSION=“1.0.2” -I. -I. -g -02
-I/usr/loca
l/include -I/usr/local/include/SDL -Dmain=SDL_main
-I/usr/include/mingw
-DWI
N32 -Uunix -c SDLgears.c
gcc -g -02 -I/usr/local/include -I/usr/local/include/SDL
-Dmain=SDL_main
-I/usr/include/mingw -DWIN32 -Uunix -o SDLgears

SDLgears.o -L/usr/local/lib -lmingw32 -lSDLmain -lSDL
-mwindows -mno-cygwin
-lGL
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/…/…/…/…/i686-pc-
cygwin/bin/ld:
cannot find -lGL
collect2: ld returned 1 exit status
make: *** [SDLgears ] Error 1

(Sorry, I’m still new at this)
/usr/include/mingw/GL is there, I checked it.

If anybody can offer any help, I’d appreciate it. I’m
hoping to get back
to
programming games after being out of practice for a long time.

Thanks in advance.

Madcat13


Get your FREE download of MSN Explorer at http://explorer.msn.com

I’ve just installed cygwin and got SDL running fine, but I can’t get any
OpenGL programs to compile.

When I configure SDLgears, everything comes out fine, but when I make, I
get
the following.

gcc -DPACKAGE=“SDLgears” -DVERSION=“1.0.2” -I. -I. -g -02
-I/usr/loca
l/include -I/usr/local/include/SDL -Dmain=SDL_main -I/usr/include/mingw
-DWI
N32 -Uunix -c SDLgears.c
gcc -g -02 -I/usr/local/include -I/usr/local/include/SDL
-Dmain=SDL_main
-I/usr/include/mingw -DWIN32 -Uunix -o SDLgears

SDLgears.o -L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows
-mno-cygwin
-lGL

/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/…/…/…/…/i686-pc-cygwin/bin/ld:

cannot find -lGL
collect2: ld returned 1 exit status
make: *** [SDLgears ] Error 1

(Sorry, I’m still new at this)
/usr/include/mingw/GL is there, I checked it.

If anybody can offer any help, I’d appreciate it. I’m hoping to get
back to
programming games after being out of practice for a long time.

Thanks in advance.

Madcat13

the opengl library on windows is opengl32.dll (or opengl.dll), try
-lopengl32
instead of -lGL

    -Erik <erik at floatingmind.com> [http://math.smsu.edu/~erik]

The opinions expressed by me are not necessarily opinions. In all probability,
they are random rambling, and to be ignored. Failure to ignore may result
in severe boredom or confusion. Shake well before opening. Keep Refrigerated.

“MadCat13” <@MadCat13> wrote in message
news:9igkit$uqq$1 at ftp.lokigames.com

I’ve just installed cygwin and got SDL running fine, but I can’t get any
OpenGL programs to compile.

When I configure SDLgears, everything comes out fine, but when I make, I
get
the following.

gcc -DPACKAGE=“SDLgears” -DVERSION=“1.0.2” -I. -I. -g -02 -I/usr/loca

l/include -I/usr/local/include/SDL -Dmain=SDL_main -I/usr/include/mingw -DWI

N32 -Uunix -c SDLgears.c

gcc -g -02 -I/usr/local/include -I/usr/local/include/SDL -Dmain=SDL_main

-I/usr/include/mingw -DWIN32 -Uunix -o SDLgears

SDLgears.o -L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows -mno-cygwin

-lGL

/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/…/…/…/…/i686-pc-cygwin/bin/ld:

cannot find -lGL
collect2: ld returned 1 exit status
make: *** [SDLgears ] Error 1

(Sorry, I’m still new at this)
/usr/include/mingw/GL is there, I checked it.

If anybody can offer any help, I’d appreciate it. I’m hoping to get back
to
programming games after being out of practice for a long time.

Thanks in advance.

Madcat13

I went through and changed my configure files and it fixed everything.

I had to change GL to opengl32, GLU to glu32, and glut to glut32.

Thanks for the assist :slight_smile:

Madcat13