Game Development Community

COmpiling on Linux

by Chris "DiGi" Timberlake · in Torque Game Engine · 11/25/2003 (3:45 pm) · 38 replies

COmpiling on Mandrake 9.1, using KDEvelope and GCC2 i get this error
Quote: platformX86UNIX/x86UNIXGL.cc:13:21: SDL/SDL.h: No such file or directory
platformX86UNIX/x86UNIXGL.cc: In function 'bool bindFunction(void*&, const char*)':
platformX86UNIX/x86UNIXGL.cc:54: 'SDL_GL_GetProcAddress' undeclared (first use this function)
platformX86UNIX/x86UNIXGL.cc:54: (Each undeclared identifier is reported only once for each function it appears in.)
platformX86UNIX/x86UNIXGL.cc: In function 'bool GLLoader::OpenGLDLLInit()':
platformX86UNIX/x86UNIXGL.cc:107: 'SDL_GL_LoadLibrary' undeclared (first use this function)
platformX86UNIX/x86UNIXGL.cc:110: 'SDL_GetError' undeclared (first use this function)
make[1]: *** [out.GCC2.DEBUG/platformX86UNIX/x86UNIXGL.obj] Error 1
make: *** [default] Error 2
Yes, i even went with a brand new right off teh CVS version
Page «Previous 1 2
#1
11/25/2003 (4:01 pm)
Sounds like you're missing SDL and SDL-devel packages.
#2
11/25/2003 (4:01 pm)
Oh ok, thnx, looks like i must go get um
#3
11/25/2003 (4:21 pm)
Where can i get that?
#4
11/25/2003 (4:33 pm)
Googling for it gives www.libsdl.org.

Though the Mandrake cd's should contain a somewhat dated version spread out on all 3 CD's.
#5
11/25/2003 (4:42 pm)
I installed it, but it didn't work
#6
11/25/2003 (4:55 pm)
Chris..
what do ya mean "didn't work"

im sure you can provide more details than that.

are you getting the same error?
then you did not complete install..
the path to your sdl is not known by the compiler.
#7
11/25/2003 (5:18 pm)
Yea, but i removed it, and i installed the new devel (from their site), and it works like a peach, thnx guys!
#8
11/25/2003 (6:43 pm)
Well, i have a new error just for you guys!!!
Quote:
--> Linking out.GCC2.DEBUG/torqueDemo_DEBUG.bin
/usr/bin/ld: cannot find -lGLU
collect2: ld returned 1 exit status
gmake[1]: *** [out.GCC2.DEBUG/torqueDemo_DEBUG.bin] Error 1
gmake: *** [default] Error 2
*** failed ***
Can anyone help me on this one?
#9
11/26/2003 (4:55 am)
Torque requires a static version of libGLU to link against in linux, so it seems you are missing libGLU.a the archive lib file, you should be able to find it in the Mesa-Lib rpm package if i remember correctly. Note you can download mesa from www.mesa3d.org recompile it and manually copy the libGLU.a that will be created to /usr/X11R6/lib.

Addendum: do not install mesa-lib though as this will overwrite your libGL and glx stuff and as such you will loose any 3D acceleration provided by your current drivers.
#10
11/26/2003 (10:44 am)
Thnx, and thnx for the warning too =)
#11
11/28/2003 (7:30 pm)
Can someone help me, i've searched all over for this GLU thing, i've ran the compiling mesa 3d, did "make install" did all of this stuff downloaded teh GLut from opengl.org, AND IT STILL WOUNT WORK!!
Quote:
--> Linking out.GCC2.DEBUG/torqueDemo_DEBUG.bin
/usr/bin/ld: cannot find -lGLU
collect2: ld returned 1 exit status
gmake[1]: *** [out.GCC2.DEBUG/torqueDemo_DEBUG.bin] Error 1
gmake: *** [default] Error 2
*** failed ***
#12
11/28/2003 (10:23 pm)
Your distribution most likely distributes packages for libglu, install the devel package and you should be ok.
#13
11/29/2003 (4:53 am)
Xavier: The Mandrake packages seem to omit the libGLU.a needed and i had to install it from the mesa sources to get it working on both 9.1 and 9.2.

Chris: If you have copied the libGLU.a from mesa-libs to /usr/X11R6/lib you will need to add the following file and save it as libGLU.la in the same directory as the libGLU.a file. Make sure the dlname and library_name match the files on your system.


# libGLU.la - a libtool library file
# Generated by ltmain.sh - GNU libtool 1.4.3 (1.922.2.110 2002/10/23 01:39:54)
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).
dlname='libGLU.so.1'

# Names of this library.
library_names='libGLU.so.1.3.501 libGLU.so.1 libGLU.so'

# The name of the static archive.
old_library=''

# Libraries that this one depends upon.
dependency_libs=' -lstdc++ -L/usr/X11R6/lib -lSM -lICE -lXmu -lXext -lXi -lX11 -lpthread -lsupc++ -lgcc_s'

# Version information for libGLU.
current=4
age=3
revision=501

# Is this an already installed library?
installed=yes

# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/usr/X11R6/lib'
#14
11/29/2003 (12:55 pm)
No go man, i had the same file with the same info, infact i even copy and pasted yours, but still i have the same error
#15
12/01/2003 (7:59 am)
Hmmm i am out of ideas for now.
#16
12/01/2003 (10:56 am)
Anyoen else have any ideas?
#18
12/02/2003 (1:19 pm)
I just noticed that your configed to use GCC2 for your build settings, try changing to using GCC3 for your build settings and make sure that gcc3 is installed (mandrake has the rpms on the cd). That is what i use on my systems and it seems to work.
#19
12/02/2003 (2:02 pm)
Thnx man, but i'm putting gentoo on
#20
12/02/2003 (6:56 pm)
@Chris: eek, don't do it :)
Even mandrake would be better. Get Redhat9 or Debian.

Sorry, of course, that's personal preference. But gentoo quickly becomes annoying.... oh im gonna install package XX, damn gotta wait one hour till it compiles. ETc :)
Page «Previous 1 2