Static win32 app

hi

i would like to know if it is possible to create static linked
win32 application using cross compiler.

i’ve created win32 executable but it need SDL.dll
i would like to have single file that could read/write jpeg images
using static version of SDL_image

sorry for messy explanation
regards, stan

“Stanislaw Stepien” wrote in message
news:mailman.1008746167.24235.sdl at libsdl.org

hi

i would like to know if it is possible to create static linked
win32 application using cross compiler.

i’ve created win32 executable but it need SDL.dll
i would like to have single file that could read/write jpeg images
using static version of SDL_image

sorry for messy explanation
regards, stan

I think you’ll find that doing this violates the terms of usage for the SDL
library. Just include SDL.dll in your installation script. Size wise there
is little difference and it also alows you to keep with the spirit of the
agreement. Better still you could release your source for your application
so other may learn from what you have done.

Ciao,

Martin.

“Martin P. Kalitis” wrote:

“Stanislaw Stepien” wrote in message

i would like to know if it is possible to create static linked
win32 application using cross compiler.

I think you’ll find that doing this violates the terms of usage for the SDL
library. Just include SDL.dll in your installation script. Size wise there
is little difference and it also alows you to keep with the spirit of the
agreement. Better still you could release your source for your application
so other may learn from what you have done.

Actually if Stanislaw wants to statically link with SDL, it doesn’t mean
he wants to violate the LGPL.

I’m writing few games and demos, which I’m going to release under GPL,
but I also want to provide binaries for download, for people who can’t
or don’t want to build everything from sources, two for every platform,
dynamically and statically linked with SDL (plus
SDL_{image,net,mixer,sound} and whatever else I’ll use).

I don’t have any Windows, BeOS, MacOS, Solaris, IRIX or FreeBSD boxes
but I want to build (dynamically and statically linked) binaries for
them, cross compiling under Linux.

Where can I find all the info to learn how to cross compile SDL
applications to platforms supported by SDL? (I’m thinking especially
about Windows, Mac and BeOS). Or maybe it’s a better idea to find
someone with native Win and Mac compilers? Anyway, it could useful to
put few links on libsdl.org to such informations, as one of the main
strengths of SDL is platform independence.

And what are the most important things to keep in mind while writing SDL
application, to make it as portable as possible, to work on every
platform where SDL is available?

Btw, you’ve done a really great job with SDL, thanks!

RaFaL Pocztarski wrote:

Where can I find all the info to learn how to cross compile SDL
applications to platforms supported by SDL? (I’m thinking especially
about Windows, Mac and BeOS). Or maybe it’s a better idea to find
someone with native Win and Mac compilers? Anyway, it could useful to
put few links on libsdl.org to such informations, as one of the main
strengths of SDL is platform independence.

And what are the most important things to keep in mind while writing SDL
application, to make it as portable as possible, to work on every
platform where SDL is available?

No answers so I guess there’s no any tutorial on cross compiling SDL
programs. Never mind, thanks anyway. Maybe if I work it out by myself,
I’ll write some docs about it.

-----Oorspronkelijk bericht-----
Van: admin at rfl.pl [mailto:admin at rfl.pl]
Verzonden: donderdag 20 december 2001 15:33
Aan: sdl at libsdl.org
Onderwerp: Re: [SDL] static win32 app

RaFaL Pocztarski wrote:

Where can I find all the info to learn how to cross compile SDL
applications to platforms supported by SDL? (I’m thinking especially
about Windows, Mac and BeOS). Or maybe it’s a better idea to find
someone with native Win and Mac compilers? Anyway, it could
useful to
put few links on libsdl.org to such informations, as one of the main
strengths of SDL is platform independence.

And what are the most important things to keep in mind
while writing SDL
application, to make it as portable as possible, to work on every
platform where SDL is available?

No answers so I guess there’s no any tutorial on cross compiling SDL
programs. Never mind, thanks anyway. Maybe if I work it out by myself,
I’ll write some docs about it.

  • RaFaL Pocztarski, admin at rfl.pl

Most programs written using SDL can be ported without problems to other
OS which on SDL is supported. I’ve written 3 programms which compile on
BeOS, Linux, FreeBSD and Win32. Only minor things were implented which
were WIN32 specific (especially sound output) but about 99.9% compiles
without a hitch.

But a warn though, I use gcc tools on the above platforms specified.
I don’t know how the portability of a in Visual C++ written programm
will be.

Regards,

Niels Wagenaar

But a warn though, I use gcc tools on the above platforms specified.
I don’t know how the portability of a in Visual C++ written programm
will be.

I can chime in on this, I use VC++ 6 on Windows, Project Builder on Mac OSX
and GNUPro on BeOS 5 and I’ve not had any trouble other than a problem with
STL templates on OSX where I needed to add an additional library to get it
to compile. I’ve been amazed at how easy it is to write once and compile
everywhere else.

Now if only I could figure this double buffering with SDL_Flip() out. :slight_smile:

laters,
mike

No, it doesn’t - not even if the application is closed source. Please,
read the LGPL, or at least this:

http://www.libsdl.org/license.html

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Wednesday 19 December 2001 08:32, Martin P. Kalitis wrote:

“Stanislaw Stepien” wrote in message
news:mailman.1008746167.24235.sdl at libsdl.org

hi

i would like to know if it is possible to create static linked
win32 application using cross compiler.

i’ve created win32 executable but it need SDL.dll
i would like to have single file that could read/write jpeg images
using static version of SDL_image

sorry for messy explanation
regards, stan

I think you’ll find that doing this violates the terms of usage for the
SDL library.

nwagenaar at digitaldynamics.nl wrote:

Most programs written using SDL can be ported without problems to other
OS which on SDL is supported. I’ve written 3 programms which compile on
BeOS, Linux, FreeBSD and Win32. Only minor things were implented which
were WIN32 specific (especially sound output) but about 99.9% compiles
without a hitch.

Did you use SDL_mixer? What was the problem? I’d like to know what could
cause problems, because I won’t be able to run and debug Windows
versions very often. I’d be developing under Linux, cross compiling for
Windows (when I finally set up the cross compiler), sending the binaries
to my Windows friends, and getting their meaningful feedback, if it
works or it doesn’t.

But a warn though, I use gcc tools on the above platforms specified.
I don’t know how the portability of a in Visual C++ written programm
will be.

That’s fine, I don’t have Windows and I’ll cross compile from Linux with
gcc anyway. I haven’t got any answers about cross compiling SDL
programs, so it could take me some time before I figure it out by myself
(i’ve never used a cross compiler before), but hopefully I’ll write some
simple howto when I finish. I’ll post it here in case someone’s
interested. If anyone wants to help me with that, it’d be great.

That’s fine, I don’t have Windows and I’ll cross compile from Linux with
gcc anyway. I haven’t got any answers about cross compiling SDL
programs, so it could take me some time before I figure it out by myself
(i’ve never used a cross compiler before), but hopefully I’ll write some
simple howto when I finish. I’ll post it here in case someone’s
interested. If anyone wants to help me with that, it’d be great.

Check out:
http://www.libsdl.org/Xmingw32/

Basic steps:
Download the cross-compiler and unpack it in /usr/local
Download cross-configure.sh and cross-make.sh
Run them in the library top level directory. I’ve actually used them
with some tweaking to build cross versions of the libpng and freetype
libraries too.

I don’t know of any way to cross-compiler to MacOS or BeOS.

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

Sam Lantinga wrote:

Check out:
http://www.libsdl.org/Xmingw32/

Thanks, that seems to be exactly what I need.
I don’t know why I haven’t found it.

Basic steps:
Download the cross-compiler and unpack it in /usr/local
Download cross-configure.sh and cross-make.sh
Run them in the library top level directory. I’ve actually used them
with some tweaking to build cross versions of the libpng and freetype
libraries too.

Ok, I’ll play with it as soon as I have any free time.
BTW, what’s the usual way to provide Windows binaries of SDL
applications? Do you include SDL DLL’s in your packages, or maybe the
whole binary SDL distro, or just give urls to the libraries? I mean,
Windows users are used to simplicity when running software, it could
seem strange to them if I told them, that in order to play my simple
stupid game, they need to download and install SDL, SDL_image,
SDL_mixer, SDL_net, etc. and everything what these libs depend on. I
don’t ask for any perfect solution, I’m just curious how others deal
with that.

I don’t know of any way to cross-compiler to MacOS or BeOS.

All of my friends who don’t have Linux use Windows anyway, so Windows
was actually the most important OS. Maybe later I’ll learn how to
cross-compile for Mac and other platforms, but they’re not very
important now.
Thanks.