[SDL] Re: Giving up SDL
Douglas Jerome
jerome at globalcrossing.net
Thu Dec 11 19:04:02 PST 2003
Leo . wrote:
> Ok, its not working, apparently, its not going to work. I'm just gonna
> give up. I compile everytime with
> g++ -o Testing SDLProg.cpp `sdl-config --libs --cflags`
> and I get the same errors. SDL config isn't working or something, and
> yes, those are backticks. my program is simple.
>
>> #include <iostream.h>
>> #include <SDL.h>
>>
>> void main()
>> {
>> SDL_Init(SDL_INIT_VIDEO);
>> SDL_Quit();
>> return;
>> }
Make main() return an int of zero, like this
#include <SDL.h>
int main (void)
{
SDL_Init (SDL_INIT_VIDEO);
SDL_Quit();
return 0;
}
If you have only libSDL.a, then try:
g++ -o Testing SDLProg.cpp `sdl-config --libs --cflags` -L/usr/X11R6/lib
-lXt -lXaw
You may fail with other non-X11 library link errors, if you have
built libSDL.a against ALSA for instance.
You really want to have a complete installation of SDL, with its shared
objects.
If you have an RPM-based system, then learn how to find the packages
with something like 'rpm -qa' and remove any packages that you are
re-installing from source.
Learn how to hunt down the libraries that you need to link with; this
hunting is learned with experience: use nm to examine library files.
> so, you have any other librarys like SDL you would recommend?
>
> ///////////
> // Leo //
> ///////////
>
> _________________________________________________________________
> Our best dial-up offer is back. Get MSN Dial-up Internet Service for 6
> months @ $9.95/month now! http://join.msn.com/?page=dept/dialup
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
--
Douglas Jerome <jerome at globalcrossing.net>
http://www.backstep.org
http://www.globalcrossing.net/~jerome
http://hackerlabs.sourceforge.net
More information about the SDL
mailing list