[SDL] A problem about SDL
Lilith Calbridge
lilith at dcccd.edu
Sat Jun 23 20:19:10 PDT 2007
It's bee years since I've done anything Unix/Linux related but I'll take a stab from memory.
I think you're doing an include for SDL. But shouldn't there be something on the command line to tell it to link to the SDL library? A -L option while compiling?
--
Lilith
>>> On 6/23/2007 at 8:52 PM, <yangbocai2002 at sohu.com> wrote:
Hello,
I am a fresh programmer, and want to study SDL nowadays, but now, I am in trouble with SDL.
I installed all the libraries I known which can be seen below, but they didn't work.
My OS is RedHat Linux.
[root at RedHat share]# rpm -qa |grep SDL
SDL-1.2.5-3
SDL_net-1.2.4-5
SDL-devel-1.2.5-3
SDL_image-devel-1.2.2-5
SDL_net-devel-1.2.4-5
SDL_mixer-1.2.4-7
SDL_image-1.2.2-5
SDL_mixer-devel-1.2.4-7
I have a simple program named test.cpp.
#include "SDL/SDL.h"
int main( int argc, char* argv[])
{
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Quit();
return 0;
}
The following error is given when the program executed:
[root at RedHat share]# g++ -o test test.cpp -ISDL
/tmp/cck4qE54.o(.text+0x19): In function `main':
: undefined reference to `SDL_Init'
/tmp/cck4qE54.o(.text+0x21): In function `main':
: undefined reference to `SDL_Quit'
collect2: ld returned 1 exit status
Now I am stuck.
I am looking forward to hear from you. Thank you very much.
&nb sp; yours sincerely,
Young Boy
我积分,我得奖,天天乐透! ( http://goto.mail.sohu.com/goto.php3?code=mailadt-ta1 )
*用搜狗拼音写邮件,体验更流畅的中文输入>> ( http://goto.mail.sohu.com/goto.php3?code=mailadt-ta )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070623/3b84750d/attachment.html
More information about the SDL
mailing list