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â
Just say the words , your wish is my commandâŚ
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???
âInterestingââŚ
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
2006/10/9, David Olofson :>
On Monday 09 October 2006 09:45, 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???âInterestingââŚ
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
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
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