[SDL] A problem about SDL

yangbocai2002 at sohu.com yangbocai2002 at sohu.com
Sat Jun 23 18:52:09 PDT 2007


<p>Hello, </p><p>&nbsp;&nbsp;&nbsp;&nbsp; I am a&nbsp;fresh&nbsp;programmer,&nbsp;and want to&nbsp;study SDL nowadays, but&nbsp;now, I am in trouble with SDL. <br />&nbsp;&nbsp;&nbsp;&nbsp; I installed all the libraries I known which can be seen below, but they didn't work. </p><p>&nbsp;&nbsp;&nbsp;&nbsp; My OS is RedHat Linux. </p><p>&nbsp;&nbsp;&nbsp;&nbsp; [root at RedHat share]# rpm -qa |grep SDL <br />&nbsp;&nbsp;&nbsp;&nbsp; SDL-1.2.5-3 <br />&nbsp;&nbsp;&nbsp;&nbsp; SDL_net-1.2.4-5 <br />&nbsp;&nbsp;&nbsp;&nbsp; SDL-devel-1.2.5-3 <br />&nbsp;&nbsp;&nbsp;&nbsp; SDL_image-devel-1.2.2-5 <br />&nbsp;&nbsp;&nbsp;&nbsp; SDL_net-devel-1.2.4-5 <br />&nbsp;&nbsp;&nbsp;&nbsp; SDL_mixer-1.2.4-7 <br />&nbsp;&nbsp;&nbsp;&nbsp; SDL_image-1.2.2-5 <br />&nbsp;&nbsp;&nbsp;&nbsp; SDL_mixer-devel-1.2.4-7 </p><p>&nbsp;&nbsp;&nbsp;&nbsp; I have a simple program named test.cpp. </p><p>&nbsp;&nbsp;&nbsp;&nbsp; #include &quot;SDL/SDL.h&quot; <br />&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp; int main( int argc, char* argv[]) <br />&nbsp;&nbsp;&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SDL_Init(SDL_INIT_EVERYTHING); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SDL_Quit(); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0; <br />&nbsp;&nbsp;&nbsp;&nbsp; } </p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The following&nbsp;error is given when the program executed: </p><p>&nbsp;&nbsp;&nbsp;&nbsp; [root at RedHat share]# g++ -o test test.cpp -ISDL <br />&nbsp;&nbsp;&nbsp;&nbsp; /tmp/cck4qE54.o(.text+0x19): In function `main': <br />&nbsp;&nbsp;&nbsp;&nbsp; : undefined reference to `SDL_Init' <br />&nbsp;&nbsp;&nbsp;&nbsp; /tmp/cck4qE54.o(.text+0x21): In function `main': <br />&nbsp;&nbsp;&nbsp;&nbsp; : undefined reference to `SDL_Quit' <br />&nbsp;&nbsp;&nbsp;&nbsp; collect2: ld returned 1 exit status </p><p>&nbsp;&nbsp;&nbsp;&nbsp; Now I am stuck. <br />&nbsp;&nbsp;&nbsp;&nbsp; I am looking forward to hear from you. Thank you very much. </p><p>&nbsp;&nbsp;&nbsp;&nbsp; yours sincerely, <br />&nbsp;&nbsp;&nbsp;&nbsp; Young Boy </p>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070624/4a5f5298/attachment.html 


More information about the SDL mailing list