This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: ___getreent error when compiling OpenGL/SDL program using gcc
- From: Suresh Venkatasubramanian <suresh at research dot att dot com>
- To: Bob E <achillea88 at yahoo dot com>
- Cc: cygwin at cygwin dot com
- Date: Tue, 25 Nov 2003 09:25:16 -0500 (Eastern Standard Time)
- Subject: Re: ___getreent error when compiling OpenGL/SDL program using gcc
- References: <20031125120900.45258.qmail@web60002.mail.yahoo.com>
On Tue, 25 Nov 2003, Bob E wrote:
> Hello,
> ?
> I have been trying to compile a SDL/OpenGL program.?
> The program works under linux, and I am able to get
> single-file OpenGL/SDL programs to compile and run
> with cygwin.? When linking multiple files however, I
> get this strange errors:
> ?
> gcc? -g?? view3ds.o gl_video.o sdl_event.o sdl_video.o
> object.o? -o view3ds -lgl
> ut32 -lopengl32 -lGLU32 -lopengl32 `sdl-config
> --cflags --libs` -lm
> view3ds.o(.text+0x94): In function `resizeWindow':
> /home/Bob/prog/sdl2/view3ds.c:37: undefined reference
> to `_gluPerspective'
> view3ds.o(.text+0x3ca): In function `DrawScene':
> /home/Bob/prog/sdl2/view3ds.c:93: undefined reference
> to `_gluErrorString'
> view3ds.o(.text+0x3d2):/home/Bob/prog/sdl2/view3ds.c:94:
> undefined reference to
> `___getreent'
> view3ds.o(.text+0x7a2): In function `main':
> /home/Bob/prog/sdl2/view3ds.c:160: undefined reference
> to `___getreent'
> view3ds.o(.text+0x7dc):/home/Bob/prog/sdl2/view3ds.c:167:
> undefined reference to
> ?`___getreent'
> view3ds.o(.text+0x809):/home/Bob/prog/sdl2/view3ds.c:174:
> undefined reference to
> ?`___getreent'
> view3ds.o(.text+0x841):/home/Bob/prog/sdl2/view3ds.c:183:
> undefined reference to
> ?`___getreent'
>
> ?
> I am using gcc 3.3.1
> ?
I don't claim this as a fix, but the opengl readme states that the correct
order for the lib files is:
-lglut32 -lglu32 -lopengl32
which is slightly different to what you have. Can you try it that way and
see ?
Suresh Venkatasubramanian, Ph: 973 360 8951 (o)
Member, Technical Staff Web: http://www.research.att.com/~suresh/
AT&T Shannon Labs
"The guitar is the ideal instrument for anyone who is able to love
loneliness." --Angelo Gilardino
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/