[Fedora] Compiling a SDL project

Post questions regarding programming in C/C++ in Linux/Unix.

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

[Fedora] Compiling a SDL project

Postby t i l e x » Sun Oct 30, 2005 9:08 am

Hi guys. I'm currently running both Windows XP and Fedora Core. I tried compiling a simple SDL project (only calling SDL_Init() ) and then I get bazillions of errors telling it can't find "name_of_all_SDL_functions". How can I fix this problem ? I have compiled my project with the following line:

c++ main.cpp -lSDL -lSDLmain -o myproject

What's wrong ?
User avatar
t i l e x
 
Posts: 3604
Joined: Wed Dec 03, 2003 3:59 pm
Location: Québec (Canada)

Postby Bugdude » Tue Nov 01, 2005 3:53 am

Just what are some of the bazillion errors you're getting?
User avatar
Bugdude
Moderator
 
Posts: 2480
Joined: Sun Aug 29, 2004 1:58 am
Location: Living in sin

Postby schloob » Tue Nov 01, 2005 5:26 pm

#include <SDL/SDL.h>

..? it's case sensitive
:]
User avatar
schloob
 
Posts: 1853
Joined: Mon Feb 16, 2004 10:29 am
Location: Seattle

Postby Emery » Tue Nov 01, 2005 5:35 pm

Do you mean to say it works on XP but not Linux?
--~~~~
User avatar
Emery
 
Posts: 4313
Joined: Sat Mar 19, 2005 9:16 am

Postby t i l e x » Tue Nov 01, 2005 5:48 pm

Bugdude wrote:Just what are some of the bazillion errors you're getting?
SDL_Init() in some_file.c is undefined...

@ schloob: I will try that.
User avatar
t i l e x
 
Posts: 3604
Joined: Wed Dec 03, 2003 3:59 pm
Location: Québec (Canada)

Postby t i l e x » Tue Nov 01, 2005 8:37 pm

Oh well, I just checked the source and already had it capitalized. As for the exact error type:

"SDL_fbevents.c: undefined reference to '__ctype_b' /usr/lib/gcc/i386-redhat-linux/4.0.0/../../../libSDL.a(SDL_fbelo.o)(.text+0x517) : In function 'eloSendQuery':"

I get this type of error for all the functions of the SDL library.
User avatar
t i l e x
 
Posts: 3604
Joined: Wed Dec 03, 2003 3:59 pm
Location: Québec (Canada)

Postby Wizard » Wed Nov 02, 2005 5:00 am

Minor help, I'm sure, but apparently there was a bug in the gcc release for debian a couple years ago that produced the same error for no reason. It was fixed in an update to the libc6 module, or whatever. You might check bug logs of your linux flavour and see if it has a fix.
User avatar
Wizard
Site Admin
 
Posts: 3226
Joined: Mon Sep 22, 2003 4:52 pm
Location: ON, CA


Return to Unix/Linux

Who is online

Users browsing this forum: No registered users and 1 guest