Best option for compiling SDL under windows

Is SDL really cross platform?

I’m working on a SDL project and I’ve got quite a bit of time invested in code running under linux
but I’ve had absolutely no luck in getting SDL to link under windows after several hours
of trying. (I’m using SDL with SDL_ttf, SDL_image, SDL_gfx. ) I’ve tried cygwin and mingw with
no success. It may be my total lack of knowledge about either of these two environments.

I’m not really asking for specific help for the linking problems, just what everyone else is using to make
sure I’m not going down a dead end.

What does everyone use to compile under windows? Is there a turn-key solution?

I use mingw with msys and code::blocks for all my windows development, and I haven’t had any issues with building SDL.
I generally just build all that stuff with code::blocks though, since i don’t care for playing around in msys when I don’t need to.

I use the freely available Express editions from Microsoft, together with
the Windows SDK.

Using the official platform tools is always a better solution.On Tue, Nov 10, 2009 at 5:21 AM, nfries88 wrote:

I use mingw with msys and code::blocks for all my windows development,
and I haven’t had any issues with building SDL.
I generally just build all that stuff with code::blocks though, since i
don’t care for playing around in msys when I don’t need to.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

of trying. (I’m using SDL with SDL_ttf, SDL_image, SDL_gfx. ) I’ve
tried cygwin and mingw with
no success. It may be my total lack of knowledge about either of
these two environments.

Hmmz? It compiles straight from MSYS+MinGW installed. Having c:\MSYS
\1.0\bin and c:\MinGW\bin in your PATH:

sh configure --prefix=c:/MinGW
make
make install

As simple as that. What was the problem you’ve encountered with MinGW ?

Regards,–
Adam

I had no trouble compiling SDL and linking with my project using
Visual Studio 2008 Express Edition. Although, I’d still like to try
MinGW still.–
Terry Welsh / mogumbo ‘at’ gmail.com
www.reallyslick.com / www.mogumbo.com

Message: 1
Date: Mon, 09 Nov 2009 10:18:46 -0800
From: “avio”
To: sdl at lists.libsdl.org
Subject: [SDL] Best option for compiling SDL under windows
Message-ID: <1257790725.m2f.20190 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”

Is SDL really cross platform?

I’m working on a SDL project and I’ve got quite a bit of time invested in code running under linux
but I’ve had absolutely no luck in getting SDL to link under windows after several hours
of trying. (I’m using SDL with SDL_ttf, SDL_image, SDL_gfx. ) I’ve tried cygwin and mingw with
no success. It may be my total lack of knowledge about either of these two environments.

I’m not really asking for specific help for the linking ?problems, just what everyone else is using to make
sure I’m not going down a dead end.

What does everyone use to compile under windows? Is there a turn-key solution?

Yes, SDL really is cross-platform. I use Code::Blocks with MinGW on
WinXP and Code::Blocks with g++ or just plain g++ on Linux. Are you
trying to build SDL or just link to it?

Jonny D

Is SDL really cross platform?

Well…
http://www.olofson.net/kobodl/

Seems like it. :wink: (And that list isn’t even totally up to date.)

I’m working on a SDL project and I’ve got quite a bit of time invested in
code running under linux but I’ve had absolutely no luck in getting SDL to
link under windows after several hours of trying. (I’m using SDL with
SDL_ttf, SDL_image, SDL_gfx. ) I’ve tried cygwin and mingw with no
success. It may be my total lack of knowledge about either of these two
environments.

I’ve used those, but it was a long time ago, coding directly towards DirectX.
Can’t remember building SDL with theme, but I can’t see why it wouldn’t work.

I’m not really asking for specific help for the linking problems, just
what everyone else is using to make sure I’m not going down a dead end.

What does everyone use to compile under windows? Is there a turn-key
solution?

I’ve been cross-compiling my Win32 binaries under Linux, using Mingw. This
seems to cover it:
http://wiki.wxwidgets.org/Install_The_Mingw_Cross-Compiler

(I’ve configured and built the cross-compiler manually on some systems, but
one can probably get away without having to do that in most cases.)On Monday 09 November 2009, at 19.18.46, “avio” wrote:


//David Olofson - Developer, Artist, Open Source Advocate

.— Games, examples, libraries, scripting, sound, music, graphics —.
| http://olofson.net http://kobodeluxe.com http://audiality.org |
| http://eel.olofson.net http://zeespace.net http://reologica.se |
’---------------------------------------------------------------------’