[SDL] what is wrong with this program?

Alexander Claffey clf5634 at yahoo.com
Tue Aug 8 08:48:17 PDT 2006


I used these flags in Makefile.  the compiler still dies saying that SDL_Init and other functions do not exist.  I would like to ask you for more ideas.

Matthew Little <matthewlittle2006 at gmail.com> wrote: If you are using G++ as your compiler, add the flags -lSDL -lSDL_image or -lSDL_mixer for the respected libraries.  I know that works on linux, Im not sure about Windows though.

On 8/5/06,  Alexander Claffey <clf5634 at yahoo.com> wrote: Thanks for the help, but I have another question.

I was able to compile the program by adding compiler flags:
`sdl-config --cflags --libs`

But it feels like a patch-up for fixing the real link problem. 

Furthermore, there is a larger program that I added the SDL code to,
and I need to modify the Makefile.
I add 'sdl-config --cflags --libs' and variations to CFLAGS,
SDL_CFLAGS, and SDL_LIBS but no success yet 


Torsten Giebl <wizard at syntheticsw.com> wrote: 

 Hello !


The code itself compiles without problems.
On Linux it should be no problem to use 
#include "SDL.h"


> #include 

> #include 

>
>
> int main() {

Your main function should look like :

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


Maybe an already installed SDL  package is
getting in the way or something else.

I would delete all SDL and SDL*.devel Packages,
use make uninstall, download the latest SDL
version and compile it from the sources.



CU
 

_______________________________________________
SDL mailing list
SDL at libsdl.org
 http://www.libsdl.org/mailman/listinfo/sdl



 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around  
http://mail.yahoo.com  


_______________________________________________
SDL mailing list
SDL at libsdl.org
 http://www.libsdl.org/mailman/listinfo/sdl




 _______________________________________________
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


 		
---------------------------------
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060808/06e1c640/attachment.html 


More information about the SDL mailing list