Giving up SDL

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;
}
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

Well, from what you’ve posted so far, I think it isn’t SDL that you are having
trouble with, but X11. Did you try adding -L/usr/X11R6/lib to the command?
What is the contents of /usr/X11R6/lib?

-brad

Quoting “Leo .” :> 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;
}
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

Quoting “Leo .” :

Ok, its not working, apparently, its not going to work.
I’m just gonna give up.

Don’t you think you’re being a bit fatalist, perhaps?

Hundreds of people are writing (tens of) thousands of lines of code and using
SDL very happily every day.

It is most probably not SDL’s fault that you’re having trouble.

The fifth time I fell off my bicycle when I was learning how to ride it, I
certainly did not say “Ok, it’s not working, apparently, it’s not going to work.
I’m just gonna give up.” I paid attention to what my peers and parents were
telling me – look out in front of you (not down on the ground) – keep
peddling; don’t stop – and don’t jerk the handlebar!

Although, if you must give up on SDL then you must. We’ll be sorry you leave and
don’t come to know SDL as well as Bill or Ryan or any of the other “old-timers”.

I don’t have any suggestions for what your problem could be (I’m not a C++
coder). Neither do I have any suggestions for possible SDL replacements for you.
For that (and for this OT post) I’m sorry.

I do hope you’re able to figure things out – SDL is really quite nifty.

-daniel–
There are 10 types of people in this world…
Those who understand binary, and those who don’t.

Post what these three tests output:

sdl-config --cflags --libs

echo $PATH

echo “#include <X11/Xatom.h>
int main() {
}” >foobar.c
g++ foobar.cOn Friday 12 December 2003 00:41, 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;
}

so, you have any other librarys like SDL you would recommend?

Are you sure you only have one version of SDL installed? I had a
similar problem when I installed SDL, because I didn’t know I already
had it (duh me). So for me, sdl-config was running and configuring the
program to run for one version of SDL, but when I actually ran the
program it linked up to another version of SDL. This resulted in wonky
stuff, included random crashes on simple programs. If you’re interested
in giving it one more shot, I would try to uninstall SDL (all versions
you can find), and reinstall it, then try to recompile/execute your
program. Hope this helps!

-MikeOn Thu, 2003-12-11 at 17:41, 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;
}

Are you sure you only have one version of SDL installed? I had a
similar problem when I installed SDL, because I didn’t know I already
had it (duh me). So for me, sdl-config was running and configuring the
program to run for one version of SDL, but when I actually ran the
program it linked up to another version of SDL. This resulted in wonky
stuff, included random crashes on simple programs. If you’re interested
in giving it one more shot, I would try to uninstall SDL (all versions
you can find), and reinstall it, then try to recompile/execute your
program. Hope this helps!

Better yet, download the source and compile it from scratch.

BTW, Allegro is one alternative. Not as spiffy as SDL, though.

-MarkOn Thu, 11 Dec 2003, Mike Shal wrote:


Mark K. Kim
AIM: markus kimius
Homepage: http://www.cbreak.org/
Xanga: http://www.xanga.com/vindaci
Friendster: http://www.friendster.com/user.jsp?id=13046
PGP key fingerprint: 7324 BACA 53AD E504 A76E 5167 6822 94F0 F298 5DCE
PGP key available on the homepage

What are the ‘same errors’? Can you post the output of g++ please.
Thanks,
Jason.> ----- Original Message -----

From: sdl-admin@libsdl.org [mailto:sdl-admin at libsdl.org]On Behalf Of
Mike Shal
Sent: Thursday, December 11, 2003 3:35 PM
To: sdl at libsdl.org
Subject: Re: [SDL] Re: Giving up SDL

On Thu, 2003-12-11 at 17:41, 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;
}

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

Are you sure you only have one version of SDL installed? I had a
similar problem when I installed SDL, because I didn’t know I already
had it (duh me). So for me, sdl-config was running and configuring the
program to run for one version of SDL, but when I actually ran the
program it linked up to another version of SDL. This resulted in wonky
stuff, included random crashes on simple programs. If you’re interested
in giving it one more shot, I would try to uninstall SDL (all versions
you can find), and reinstall it, then try to recompile/execute your
program. Hope this helps!

Better yet, download the source and compile it from scratch.

That was actually part of my problem - RedHat already had SDL
installed from an rpm, and then I installed it myself from source.
That’s how it ended up in two different versions in different places.
Just something to watch out for!

-Mike

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;
}

main() returns int, not void.

Listen to what you have been told. You need the .so dynamic libraries.
/usr/lib should have these:

libSDL-1.2.so.0 -> libSDL-1.2.so.0.0.6*
libSDL-1.2.so.0.0.6*
libSDL.a
libSDL.la*
libSDL.so -> libSDL-1.2.so.0.0.6*
libSDLmain.a

You will get X11 library link failures if you use the .a without
also specifying the appropriate X11 library(s), probably libXt
with something like -lXt on the command line.

so, you have any other librarys like SDL you would recommend?

You might try plib. But, if you can’t get this right, why do you
think you can get something else working?

Don’t let the frustration get to you. It takes time to learn
what you are doing.> ///////////

// 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 <@Douglas_Jerome>
http://www.backstep.org
http://www.globalcrossing.net/~jerome

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 <@Douglas_Jerome>
http://www.backstep.org
http://www.globalcrossing.net/~jerome

Also try:

g++ -o Testing SDLProg.cpp sdl-config --static-libs --cflags

Some systems don’t resolve the symbols from the X11 libraries by default,
and the --static-libs prints out all the dependencies that you might need.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

I presume you mean me. Hey, damnit! I’m only 28!

'sides, I’m not nearly as 'leet as Ryan. C’mon, he’s like the audio guru
around here :slight_smile:

Thx tho :wink:

-bill!On Thu, Dec 11, 2003 at 05:05:53PM -0600, Daniel Hedrick wrote:

Although, if you must give up on SDL then you must. We’ll be sorry you leave and
don’t come to know SDL as well as Bill or Ryan or any of the other “old-timers”.

What’s embarassing is not being an old-timer at 33!

-daniel
@Daniel_HedrickOn Friday, December 12, 2003, at 02:19 AM, Bill Kendrick wrote:

I presume you mean me…I’m only 28!


There are 10 kinds of people in this world…
those who understand binary, and those who don’t.

Hey buddy could you try compile this code before giving up ?

int main(int argc, char ** argv)
{
SDL_Init(SDL_INIT_VIDEO);
SDL_Quit();
return 0;
}

There is a couple of things in your code that cause some problems in some
places… Nothing related to SDL , related with C … If u are working in linux
start to code as god demmand … unless that you redefine the main prototype
use int main(… and return 0 at the end. Linux is a respectable posix SO …
that junk of void main( … compile in Win without problems but not here…
and leave the main arguments there when you work with SDL … even if u dont
use it in ur program…
Please try that before giving up…> 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
#include

void main()
{
SDL_Init(SDL_INIT_VIDEO);
SDL_Quit();
return;
}
so, you have any other librarys like SDL you would recommend?

///////////
// Leo //
///////////