LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games
User Name
Password
Linux - Games This forum is for all discussion relating to gaming in Linux.

Notices

Reply
 
Search this Thread
Old 01-17-2004, 06:42 AM   #1
timcrafton
LQ Newbie
 
Registered: Jan 2004
Distribution: Mandrake 9.2 (For Now)
Posts: 19

Rep: Reputation: 0
Sdl


Hello, me again with another newbie question!
I have tried to download several games to play on my linux box and when I attempt to
./configure them I get this output ALOT:

checking for SDL - version >= 1.2.5... no
*** The sdl-config script installed by SDL could not be found
*** If SDL was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the SDL_CONFIG environment variable to the
*** full path to sdl-config.
configure: error: *** SDL version 1.2.5 not found!

I attempted to download SDL and install it but it says something about it already being on my machine. Any help would be appreciated!

THX,
TC
 
Old 01-17-2004, 12:51 PM   #2
LavaDevil94
Guru
 
Registered: Jul 2003
Distribution: Gentoo 2004.2: Who needs exmmpkg when you have emerge?
Posts: 1,795

Rep: Reputation: 46
did you download the development headers? you probably only have the sdl binary libs. you can get the development headers by downloading, compiling, and installing the SDL source.
 
Old 01-29-2004, 10:49 AM   #3
dufronte
LQ Newbie
 
Registered: Jan 2004
Posts: 5

Rep: Reputation: 0
hello..
I'm newbie in SDL..

i always get this error while compiling my sdl aps...

gmake all-recursive
gmake[1]: Entering directory `/home/duffy/sdl_test01'
cd . && \
/bin/sh /home/duffy/sdl_test01/admin/missing --run automake-1.7 --foreign Makefile
cd . && perl admin/am_edit Makefile.in
cd . && /bin/sh ./config.status Makefile
fast creating Makefile
gmake[1]: Leaving directory `/home/duffy/sdl_test01'
gmake[1]: Entering directory `/home/duffy/sdl_test01'
Making all in sdl_test01
gmake[2]: Entering directory `/home/duffy/sdl_test01/sdl_test01'
cd .. && \
/bin/sh /home/duffy/sdl_test01/admin/missing --run automake-1.7 --gnu sdl_test01/Makefile
cd .. && perl admin/am_edit sdl_test01/Makefile.in
cd .. && /bin/sh ./config.status sdl_test01/Makefile depfiles
fast creating sdl_test01/Makefile
config.status: executing depfiles commands
gmake[2]: Leaving directory `/home/duffy/sdl_test01/sdl_test01'
gmake[2]: Entering directory `/home/duffy/sdl_test01/sdl_test01'
/bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -O0 -g3 -Wall -fno-exceptions -fno-check-new -o sdl_test01 main.o -lSDL -L/usr/lib
/usr/lib/libSDL.so: undefined reference to `pthread_create'
/usr/lib/libSDL.so: undefined reference to `pthread_cancel'
/usr/lib/libSDL.so: undefined reference to `sem_destroy'
/usr/lib/libSDL.so: undefined reference to `sem_wait'
/usr/lib/libSDL.so: undefined reference to `sem_post'
/usr/lib/libSDL.so: undefined reference to `sem_init'
/usr/lib/libSDL.so: undefined reference to `pthread_sigmask'
/usr/lib/libSDL.so: undefined reference to `sem_trywait'
/usr/lib/libSDL.so: undefined reference to `pthread_mutexattr_init'
/usr/lib/libSDL.so: undefined reference to `sem_getvalue'
/usr/lib/libSDL.so: undefined reference to `pthread_join'
collect2: ld returned 1 exit status
gmake[2]: *** [sdl_test01] Error 1
gmake[2]: Leaving directory `/home/duffy/sdl_test01/sdl_test01'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/duffy/sdl_test01'
gmake: *** [all] Error 2
*** failed ***

im using SDL-1.2.6 and SDL-Devel-1.2.6

I've setup the Linker Options like the Mini-Howto told..

(i'm using KDevelope)..

is there anyway to setup SDL in KDevelope ??

and how to solve this problem..


thanks in advance..
 
Old 01-29-2004, 10:50 AM   #4
dufronte
LQ Newbie
 
Registered: Jan 2004
Posts: 5

Rep: Reputation: 0
btw.. this is my source code :
#include "SDL/SDL.h"
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{

printf("SDL initialized");
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER)){
printf("SDL Initialized Successfully ");
}
else
{
printf("inisialisasi gagal ");

}
SDL_Quit();
return EXIT_SUCCESS;
}
 
Old 01-29-2004, 11:17 AM   #5
LavaDevil94
Guru
 
Registered: Jul 2003
Distribution: Gentoo 2004.2: Who needs exmmpkg when you have emerge?
Posts: 1,795

Rep: Reputation: 46
maybe you should downgrade to SDL-1.2.5?
 
Old 01-29-2004, 07:04 PM   #6
dufronte
LQ Newbie
 
Registered: Jan 2004
Posts: 5

Rep: Reputation: 0
well.. I'll try that one...

but after I posted my problem here..
I downloaded sdl-config from libsdl.org respistory (* ups bad english)
then I tried to recompiled...

then the error is changed :
gmake all-recursive
gmake[1]: Entering directory `/home/duffy/sdlc'
cd . && /bin/sh ./config.status Makefile
Uhh. Malformed pattern in .subs (s,@LDFLAGS@,-I/usr/include/SDL -D_REENTRANT) at admin/config.pl line 97.
Making all in sdlc
gmake[2]: Entering directory `/home/duffy/sdlc/sdlc'
cd .. && /bin/sh ./config.status sdlc/Makefile depfiles
Uhh. Malformed pattern in .subs (s,@LDFLAGS@,-I/usr/include/SDL -D_REENTRANT) at admin/config.pl line 97.
config.status: executing depfiles commands
/bin/sh ../libtool --silent --mode=link gcc -O2 -O0 -g3 -Wall -o sdlc main.o
main.o(.text+0x26): In function `main':
/home/duffy/sdlc/sdlc/main.c:27: undefined reference to `SDL_Init'
main.o(.text+0x42):/home/duffy/sdlc/sdlc/main.c:31: undefined reference to `SDL_Quit'
collect2: ld returned 1 exit status
gmake[2]: *** [sdlc] Error 1
gmake[2]: Leaving directory `/home/duffy/sdlc/sdlc'
gmake[1]: Leaving directory `/home/duffy/sdlc'
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2
*** failed ***

notice this :

Uhh. Malformed pattern in .subs (s,@LDFLAGS@,-I/usr/include/SDL -D_REENTRANT) at admin/config.pl line 97.

am i got the wrong sdl-config ??

and this :
/home/duffy/sdlc/sdlc/main.c:27: undefined reference to `SDL_Init'

damn.. I've checked that all linker and directories is set...
 
Old 01-29-2004, 07:09 PM   #7
dufronte
LQ Newbie
 
Registered: Jan 2004
Posts: 5

Rep: Reputation: 0
ok.. then I tried to downgrade the SDL to 1.2.5
but it didn't work

still the same error
 
Old 01-30-2004, 10:44 AM   #8
dufronte
LQ Newbie
 
Registered: Jan 2004
Posts: 5

Rep: Reputation: 0
ahhh... at last...
I found the answer...

here what I did for this SDL work on my KDevelope..

oh yeah.. for more information.. i'm using SuSE 9.0

first..
in Compiler Options.. add this in Linker Flags :
-L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -I/usr/include/SDL -D_REENTRANT

then check if slang library is installed on your system...
I've checked mine.. and it was an error like it cannot found -islang flags etc.. ( I dont understnad this... :P heheh I'm a Newbie anyway..)

then.. I tried to install slang-devel from the SUSE 9.0 Distribution CD
then... I tried to compile my program again...

walah... Its worked smoothly

hope this information will be usefull for a newbie like me who stuck like I was

thanks for your responses guys
 
Old 10-13-2004, 01:11 PM   #9
Treco
LQ Newbie
 
Registered: Oct 2004
Posts: 1

Rep: Reputation: 0
Try this...
g++ -Wall `sdl-config --cflags` `sdl-config --libs` -o example example.c
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SDL issues with 10.1 -> 10.2 Vgui Slackware 1 09-20-2005 03:22 AM
Trying to program an SDL application but cannot find the SDL.h file:SuSE 9.2&KDevelop pujolasdf Linux - Newbie 4 03-13-2005 07:50 AM
about SDL dt_ashok Programming 1 12-01-2004 03:16 PM
SDL Help dtheorem Linux - Software 1 11-04-2004 04:38 AM
Sdl? tundra Linux - General 5 05-03-2003 08:17 AM


All times are GMT -5. The time now is 09:36 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration