Hi all, i’m new to this forum, SDL and linux.
I already posted my question on
Gamedev.net(http://www.gamedev.net/community/forums/topic.asp?topic_id=260057)
about a week ago, but i still can solve the problem.
I’m trying to make a simple SDL program under RedHat
Linux9, the SDL include and library files are already
installed properly(i even try to reinstall them but it
didn’t help). This is the code itself:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <iostream.h>
#include <stdlib.h>
#include <SDL/SDL.h>
int main(int argc, char *argv[])
{
cout << “Hello, World!” << endl;
if( SDL_Init( SDL_INIT_VIDEO ) < 0 )
{
cout<< “SDL Initialization failed”<<endl;
exit(1);
}
atexit(SDL_Quit);
return EXIT_SUCCESS;
}
And this is how i’m building the executable:
g++ -Wall sdl-config --cflags
sdl-config --libs
-Wno-deprecated -o main main.cpp.
But i’m having these errors:
main.o(.text+0x2b): In function main': : undefined reference to
SDL_Init’
main.o(.text+0x59): In function main': : undefined reference to
SDL_Quit’
collect2: ld returned 1 exit status
Please can i get some help here?
Vous manquez d?espace pour stocker vos mails ?
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Cr?ez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis. A t?l?charger gratuitement sur http://fr.messenger.yahoo.com