Hi

Hi all i have a beginner question,too :wink:
When i try sth like “SDL_Init(SDL_INIT_EVERYTHING);” the compiler says it
doesnt match the argument number???
and another question :: Should i use sdl_main instead of main in our sdl
applications???Why??
and what lib files to add??
tthanks for the answers–
Just say the words , your wish is my command…

Hi all i have a beginner question,too :wink:
When i try sth like “SDL_Init(SDL_INIT_EVERYTHING);” the compiler
says it doesnt match the argument number???

“Interesting”… :wink:

What platform (OS), language and compiler is this?

and another question :: Should i use sdl_main instead of main in our
sdl applications???

No. On the platforms that require main() to be wrapped, including
SDL.h takes care of this automatically.

Why??

Some platforms don’t use main() as the entry point for normal
applications, and I think there are some other issues in some cases,
that SDL deals with.

The whole idea is that it should be possible to write code that will
compile and work on any platform supported by SDL. For the most part,
it’ll Just Work™ everywhere, as long as your code is correct.
(Which is, unfortunately, not as trivial as it may seem at first.)

and what lib files to add??

Well, “the one that describes the SDL library” - but I can’t tell you
much more than that without knowing what platform you’re on.

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
’-- http://www.reologica.se - Rheology instrumentation --'On Monday 09 October 2006 09:45, Engin ?alar wrote:

first thanks for the answer
so sorry for the incomplete question…
Im working on win32 platform(win xp,intel machine) and using devcpp(mingw)…
now thesame questions again :slight_smile:

2006/10/9, David Olofson :>

On Monday 09 October 2006 09:45, Engin ?alar wrote:

Hi all i have a beginner question,too :wink:
When i try sth like “SDL_Init(SDL_INIT_EVERYTHING);” the compiler
says it doesnt match the argument number???

“Interesting”… :wink:

What platform (OS), language and compiler is this?

and another question :: Should i use sdl_main instead of main in our
sdl applications???

No. On the platforms that require main() to be wrapped, including
SDL.h takes care of this automatically.

Why??

Some platforms don’t use main() as the entry point for normal
applications, and I think there are some other issues in some cases,
that SDL deals with.

The whole idea is that it should be possible to write code that will
compile and work on any platform supported by SDL. For the most part,
it’ll Just Work™ everywhere, as long as your code is correct.
(Which is, unfortunately, not as trivial as it may seem at first.)

and what lib files to add??

Well, “the one that describes the SDL library” - but I can’t tell you
much more than that without knowing what platform you’re on.

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
’-- http://www.reologica.se - Rheology instrumentation --’


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

–
Just say the words , your wish is my command…

might i suggest a more meaningful subject ? aslo, i think its used for
virus’s on a particular operating system.

Engin ?alar wrote:> Hi all i have a beginner question,too :wink:

When i try sth like “SDL_Init(SDL_INIT_EVERYTHING);” the compiler says it
doesnt match the argument number???
and another question :: Should i use sdl_main instead of main in our sdl
applications???Why??
and what lib files to add??
tthanks for the answers



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

David i have written about the platform and compiler i use

Can you know help me with the problem???

2006/10/9, matt :>

might i suggest a more meaningful subject ? aslo, i think its used for
virus’s on a particular operating system.

Engin ?alar wrote:

Hi all i have a beginner question,too :wink:
When i try sth like “SDL_Init(SDL_INIT_EVERYTHING);” the compiler says
it
doesnt match the argument number???
and another question :: Should i use sdl_main instead of main in our sdl
applications???Why??
and what lib files to add??
tthanks for the answers



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

–
Just say the words , your wish is my command…

Well, I don’t work on Windows (I use a cross compiler on Linux to
build Windows binaries), so I figured someone else might have
something more specific to say.

Normally, I use autotools, which handles the platform specific details
automatically. However, I use plain makefiles for some of my simplest
example programs, and I think these will work with pretty much
anything reasonably Un*x-like that has (some version of) make, gcc
and SDL installed. Here’s the one from simplemixer:On Wednesday 11 October 2006 13:40, Engin ?alar wrote:

David i have written about the platform and compiler i use

Can you know help me with the problem???


CC = gcc

CLIBS = $(shell sdl-config --libs)
CFLAGS = -O3 -Wall $(shell sdl-config --cflags)

SOURCES = simplemixer.c

all: simplemixer

clean:
rm -f *.o
rm simplemixer

simplemixer: ${SOURCES}
${CC} ${CFLAGS} -o simplemixer ${SOURCES} ${CLIBS}

This is relying on the sdl-config script to provide the libs and flags
needed for the platform at hand.

Of course, you’ll need pull in SDL_image, SDL_mixer etc as well, if
you use any of those.

As to the SDL_Init(), that one sounds incredibly strange. The function
takes a Uint32, and of course, it should be identical on all
platforms. (One of the major motivations for using SDL!)

Typos? “Garbage” characters in the source? Try a different text
editor, or a hex file editor. Some editors will completely hide
non-ASCII characters, so if you fumble with the keys on a non-US
keyboard, you may be in for some serious strangeness.

Something screwing up the SDL_INIT_EVERYTHING symbol/macro, so it
expands to nothing, or to something that looks like multiple
arguments? (Try printf()ing it or something, or just expand it in an
#error directive.)

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
’-- http://www.reologica.se - Rheology instrumentation --’

Have you tried just intializing the video subsystem? do you really need SDL_INIT_EVERYTHING?
Just wondering whether trying it with a different argument might make a difference.
For your information, I have used SDL quite successfully with Dev-c++ on Windows(though I am now using MS’s free MSVC2005 Express Edition.) Make sure that your linker options are set correctly, though: -lmingw32 -lSDLmain -lSDL -mwindows
without all 4 of those items in the linker options box, I don’t think it will work correctly(Took me hours, nay, days(!) to finally be able to compile stuff with SDL in Dev-c++. The problem is, some of the tutorials only mention 3 out of those 4 linker options, and even on the mailing list archives you can get incomplete information.) Anyway, hope it helps!

-David Olsen (Yes, I realize you were meaning David Olofson, but I’m David, nonetheless!)

p.s. Also make sure that your project’s include directories also have the folder where you’ve installed the SDL header files.----- Original Message -----
From: Engin ?alar
To: A list for developers using the SDL library. (includes SDL-announce)
Sent: Wednesday, October 11, 2006 6:40 AM
Subject: Re: [SDL] hi…

David i have written about the platform and compiler i use

Can you know help me with the problem???

2006/10/9, matt :
might i suggest a more meaningful subject ? aslo, i think its used for
virus’s on a particular operating system.

Engin ?alar wrote:
> Hi all i  have a beginner question,too ;)
> When i try sth like "SDL_Init(SDL_INIT_EVERYTHING);" the compiler says it
> doesnt match the argument number??????
> and another question :: Should i use sdl_main instead of main in our sdl 
> applications???Why??
> and what lib files to add??
> tthanks for the answers
>
> ------------------------------------------------------------------------
>
> _______________________________________________ 
> 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

–
Just say the words , your wish is my command…



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