Welcome to devpaks repository

SDL-1.2.8

Packagerspecu
spec at webtech dot pl
Version1
Last modified2004-12-27 22:49:14
Linkhttp://www.libsdl.org/
DescriptionSimple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.

This is a devpak containing libSDL 1.2.8 as well as examples/templates and SDL Reference help file created by Lea Anthony.
CategorySDL
Depends on
Downloadhttps://sourceforge.net/ project/ showfiles.php? group_id=94270& package_id=124190& release_id=292788
If download doesn't work use right mouse button on the filename and select Save Link As...
Authors of devpaks are responsible for their content!

You can register yourself to be notified of the changes to this devpak if you log in.

Comments:

compile flags by guest 2006-07-11 04:29:56
Hi, I was curious as to how I get to the Compiler Flags section for Dev-C++. Thank you for your time. Bye.

-Hayden
undefined reference to WinMain@16 by guest 2006-06-23 07:53:09
..urrr, its making me mad..
im getting the same error!
[Linker error] undefined reference to WinMain@16.

my code:

#include "SDL.h"
int main( int argc, char* argv[] )
{
//initialize systems
SDL_Init ( SDL_INIT_VIDEO ) ;
//set our at exit function
atexit ( SDL_Quit ) ;
//create a window
SDL_Surface* pSurface = SDL_SetVideoMode ( 512 , 384 , 0, SDL_ANYFORMAT ) ;
//declare event variable
SDL_Event event ;
//message pump
for ( ; ; )
{
//look for an event
if ( SDL_PollEvent ( &event ) )
{
//an event was found
if ( event.type == SDL_QUIT ) break ;
}
}//end of message pump
//done
return ( 0 ) ;
}

and it does it with any code that i've tried to use sdl with.
linker error by guest 2006-02-21 12:16:38
undefined reference to WinMain@16

I have tried all the various suggested solutions none of which
worked curiously if I compile only the file and not the project
it compiles fine.

Any thoughts
Problems with a build by guest 2005-12-20 01:34:12
Hello to all.
I am trying to construct to one dll through source code of the SDL-1.2.8 but I do not obtain, I am using the MSYS and it configures it is this:
./configure -- prefix=c:/dev-cpp -- disable-static "CFLAGS=-O3 - fomit-frame-pointer - march=1386"

But when use nasm lib is very slow, without the use of nasm (- - disable-nasm) it compels in correct way but she is slow excessively and the same version of lib (SDL-1.2.8) that I caught here is well faster. What I must make so that the SDL-1.2.8 can use nasm to be faster?

thanks for help.
read the sdl faq. by guest 2005-05-30 18:40:35
Hi, i think this may help you, i found it at
http://www.libsdl.org/faq.php?action=listentries&category=4
/************/
Make sure that you are declaring main() as:

#include "SDL.h"

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

You should be using main() instead of WinMain() even though you are creating a Windows application, because SDL provides a version of WinMain() which performs some SDL initialization before calling your main code. If for some reason you need to use WinMain(), take a look at the SDL source code in src/main/win32/SDL_main.c to see what kind of initialization you need to do in your WinMain() function so that SDL works properly.
/**************/
cc1plus.exe unrecognized command line option "-fsave-memoized" by guest 2005-05-29 03:49:07
cc1plus.exe unrecognized command line option "-fsave-memoized"

MingW 3.7 package, SDL 1.2.8 package, Dev-C++ 4.9.9.2
Compiles fine on Visual C++ 6

and it does say memoized and not memorized, so I *assume* it's a spelling error somewhere, and should be "-fsave-memorized"

Can anyone help on this?
another compiler error... by guest 2005-04-10 09:25:48
Every time I try to compile, I get this error:

C:\Dev-Cpp\lib\libSDLmain.a(SDL_win32_main.o.b)(.text+0x3bd) In function `console_main':

[Linker error] undefined reference to `SDL_main'

C:\Dev-Cpp\SDL test\Makefile.win [Build Error] [test.exe] Error 1


can anyone help me here?
Re: 97 c:\dev-c_~1\include\sdl\sdl_audio.h by guest 2005-03-31 08:29:59
Remove "SDLCALL" at line 97 in the file sdl_audio.h

Like this:

(before)
void (SDLCALL *filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);

(after)
void (*filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);

Then save. Make a test now :)
97 c:\dev-c_~1\include\sdl\sdl_audio.h by guest 2005-03-21 16:34:45
i see this error in the compiler tab
97 c:\dev-c_~1\include\sdl\sdl_audio.h parse error before [
wen i compile this code
#include <SDL/SDL.h> /* All SDL App's need this */
#include <stdio.h>

int main() {

printf("Initializing SDL.\n");

/* Initialize defaults, Video and Audio */
if((SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO)==-1)) {
printf("Could not initialize SDL: %s.\n", SDL_GetError());
exit(-1);
}

printf("SDL initialized.\n");

printf("Quiting SDL.\n");

/* Shutdown all subsystems */
SDL_Quit();

printf("Quiting....\n");

exit(0);
}
How do I install this? by guest 2005-03-12 12:18:28
Ok im getting very angry! I'm on my third compiler, and I still can't install SDL. I now am using dev-c++ and everything seems to work, except for the compiling! I just get error messages for every sdl command I want to compile. In minGW, I got the same eror message as the user two down. Please help!
Re: compile error by mol (michal at molhanec dot net) 2005-02-07 17:23:53
see http:// twomix.devolution.com /pipermail /sdl /2004-December/ 066257.html
or upgrade your MinGW to 3.4.2
compile error by guest 2005-02-07 17:07:09
I always got this error:

C:/Program Files/Dev-Cpp/include/SDL/SDL_audio.h:97: error: syntax error before `[' token

anyone can help?
Re: undefined reference to WinMain by specu (spec at webtech dot pl) 2004-12-27 23:00:51
devpaks 1.2.7 and this one 1.2.8 both include sdl-config in c:\dev-cpp\bin directory. when run from msys shell it will tell you what flags do you need to compile (sdl-configs --cflags) and what libraried do you need to link you program (sdl-config --libs).

If you don't use msys shell sdl-config --cflags for 1.2.8 (and 1.2.7) returns:
-Ic:/Dev-Cpp/include/SDL -Dmain=SDL_main
so you need to specify "-Dmain=SDL_main" in parameters tab in project options, in compiler window.
If you include SDL like this:
#include <SDL/SDL.h>
(prepended "SDL/") you don't need to include c:/Dev-Cpp/include/SDL in your include directories, otherwise you do.
sdl-config --libs retuns:
-Lc:/Dev-Cpp/lib -lmingw32 -lSDLmain -lSDL -mwindows
c:/Dev-Cpp/lib is included in Dev-C++ by default so you can disregard that part. -mwindows is automatically added when your project is of type "Windows GUI". if it's not it will most likely still compile except it will show a "DOS Window".
Other flags "-lmingw32 -lSDLmain -lSDL" need to be added into parameters tab in project options, in linker window.
Once you install the devpak in project templates (new project window) in multimedia tab you'll have 2 new templates: SDL&GL and SDL - both those templates have the above linker and compiler flags set correctly so you can you copy and append them to your project's tabs.

I hope it's a little bit clearer now.
Re: undefined reference to WinMain by guest 2004-12-03 18:06:11
Perhaps you should add a main function.
And add the line to the linker(explained above).

Works with Dev-C++, though.
undefined reference fix by guest 2004-11-27 16:42:17
go into the project options > parameters

add this line to the linker
-lmingw32 -lSDLmain -lSDL
Solution by guest 2004-08-05 10:58:38
Here's an exception from my own SDL DevPak (includes SDL_mixer, SDL_image, docs and tutorials, latest version should be soon at http://hno.freeshell.org ):

Remember to link libs in correct ordrer: -lSDL_image should be before
-lSDL and -lSDLmain
I use this (Project->Options->Parameters->Linker):
-lmingw32 -lSDL_image -lSDLmain -lSDL
Of course don't add -lSDL_image and -lSDL_mixer if you aren't using
SDL_image or SDL_mixer.
-lopengl32 must be added if compiling OpenGL app.
Re: undefined reference to WinMain by mol (michal at molhanec dot net) 2004-07-23 16:33:21
add -lSDLmain to linker parameters
Re: undefined reference to WinMain by guest 2004-07-23 10:53:05
It seems that when you start a project within Dev-C++, for the project type, you must choose Multimedia -> SDL, otherwise the project won't be setup to use SDL and you will get the above error.

I don't know what parameters to change to get an empty project or a different project working with SDL.
undefined reference to WinMain by guest 2004-07-23 10:38:28
It seems that when I use these libraries, the linker complains that WinMain doesn't exist:

[Linker error] undefined reference to 'WinMain@16'

Anyone have any ideas how to solve this problem ?
Add new comment


Newlines are transformed to line-breaks ('<br />').

Spam protection: Please type the number 2 into the textbox:

Warning: comment is NOT automatically send to the author of the devpak, so if you need to contact author directly (e.g. you've found a bug) send it to the author's email.

You are not logged. New user Login