SDL with mingw

Hello,

Having all sorts of problems trying to compile SDL 1.3 for mingw, even tried
cross compiling from Mac OSX and Ubuntu. Have spent more hours than I can
count troubleshooting. So this is a plea, a down on my knees begging plea
for a precompiled SDL 1.3 static library for mingw 32 bit. I would use
Visual Studio Express but the laptop I bought in Shanghai from a licensed
Samsung dealer was loaded with a pirated copy of WinXP, so I can’t get SP3
without forking out a lot of dough.

I would really like to release my graphical roguelike for windows, so I hope
someone can help a brother out.

Thanks.

Having all sorts of problems trying to compile SDL 1.3 for mingw, even
tried cross compiling from Mac OSX and Ubuntu. Have spent more hours
than I can count troubleshooting. So this is a plea, a down on my
knees begging plea for a precompiled SDL 1.3 static library for mingw
32 bit. I would use Visual Studio Express but the laptop I bought in
Shanghai from a licensed Samsung dealer was loaded with a pirated copy
of WinXP, so I can’t get SP3 without forking out a lot of dough.

I would really like to release my graphical roguelike for windows, so
I hope someone can help a brother out.

Hi.

Have you tried to use mingw-cross-env? You “only” have to add a sdl13.mk

  • all the needed environment stuff is there already.

Greetings
Martin

Yes, I have tried cross-env from Ubuntu and from OSX, with various errors
resulting.On Mon, Aug 1, 2011 at 6:24 PM, Martin Gerhardy <martin.gerhardy at gmail.com>wrote:

Having all sorts of problems trying to compile SDL 1.3 for mingw, even
tried cross compiling from Mac OSX and Ubuntu. Have spent more hours
than I can count troubleshooting. So this is a plea, a down on my
knees begging plea for a precompiled SDL 1.3 static library for mingw
32 bit. I would use Visual Studio Express but the laptop I bought in
Shanghai from a licensed Samsung dealer was loaded with a pirated copy
of WinXP, so I can’t get SP3 without forking out a lot of dough.

I would really like to release my graphical roguelike for windows, so
I hope someone can help a brother out.

Hi.

Have you tried to use mingw-cross-env? You “only” have to add a sdl13.mk

  • all the needed environment stuff is there already.

Greetings
Martin


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

I meant this: http://mingw-cross-env.nongnu.org/Am Montag, den 01.08.2011, 18:38 +0800 schrieb Jeremy Jurksztowicz:

Yes, I have tried cross-env from Ubuntu and from OSX, with various
errors resulting.

Yep, tried it with no success. I’ll try again so I can post the error log,
but I put considerable effort into fixing it, changing configure options and
even editing the makefile. Ugh. I was hoping that someone had a 32bit DLL
hanging around that they could send to jurksztowicz (AT) gmail.On Mon, Aug 1, 2011 at 8:17 PM, Martin Gerhardy <martin.gerhardy at gmail.com>wrote:

Am Montag, den 01.08.2011, 18:38 +0800 schrieb Jeremy Jurksztowicz:

Yes, I have tried cross-env from Ubuntu and from OSX, with various
errors resulting.

I meant this: http://mingw-cross-env.nongnu.org/


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

I have a 32-bit SDL.dll made with MinGW, I think version 4.5. Not that I think it matters but I made it in WindowsXP. Sending your way now.

You can either refer to this thread where I posted it yesterday (my SDL builds contain static and dynamic libraries):
http://forums.libsdl.org/viewtopic.php?t=6593 :smiley:

Or, you could post what actually goes wrong and me or someone else can try to help you figure out how to get it working.

I just had a crack at this myself, in order to port my App to Windows as well as Linux and Android. I’m following this guide:
http://blog.pantokrator.net/2006/08/08/setting-up-msysmingw-build-system-for-compiling-sdlopengl-applications/

Everything installed and set up fine, tell I come to the classic ./configure && make && make install part for SDL 1.3:

William at BELIAL /SDL
$ ./configure --prefix=/mingw
./configure: line 1397: syntax error near unexpected token ‘acinclude’
./configure: line 1397: ‘AC_CONFIG_MACRO_DUR’

Keep me posted of any progress you guys make with this: I’ll keep trying, but if it won’t cooperate I might try with Cygwin instead.

What a clusterfuck of an operating system windows is to develop for. Sigh.

William

I found out that I need to link to the following libraries when compiling an
SDL app with mingw:
Imm32, Winmm, Ole32, oleaut32, uuid, Version, Gdi32

I haven’t got the game running yet, but after an afternoon of googling I
managed to compile and link it successfully.
I put up the precompiled SDL 1.3 on my dropbox HERE
http://dl.dropbox.com/u/32525776/sdl-1.3.5581-x86-generic.rar for anyone to
download. It’s 32bit for mingw, I don’t even know what features were
compiled into it, but I’ll take whatever. Thanks Andreas!

Hey, Wilbefast, we keep bumping into each other on the net! It’s
eclectocrat, the Mysterious Castle guy. How’s the debugging game going, you
stopped updating the devlog at TIGSource.On Tue, Aug 2, 2011 at 6:06 PM, wilbefast wrote:

**
I just had a crack at this myself, in order to port my App to Windows as
well as Linux and Android. I’m following this guide:

http://blog.pantokrator.net/2006/08/08/setting-up-msysmingw-build-system-for-compiling-sdlopengl-applications/

Everything installed and set up fine, tell I come to the classic
./configure && make && make install part for SDL 1.3:

William at BELIAL /SDL
$ ./configure --prefix=/mingw
./configure: line 1397: syntax error near unexpected token ‘acinclude’
./configure: line 1397: ‘AC_CONFIG_MACRO_DUR**’

Keep me posted of any progress you guys make with this: I’ll keep trying,
but if it won’t cooperate I might try with Cygwin instead.

What a clusterfuck of an operating system windows is to develop for. Sigh.

William


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

Mysterious castle? Hey cool! Jeremy :slight_smile: It’s a small world.

Thanks for this: I managed to get my project compiled and working and showed
it to my boss just now over Skype - he’s quite impressed that I have things
running on Windows and Android without paying any licence fees. Thank you
SDL :wink:
Since I’m using Code::Blocks both on Linux and Windows (I’m really lazy) I
pointed the IDE at the libraries and headers you sent, and it actually
worked, though I needed move the headers to \include\ rather than
\include\SDL\ to keep it happy.

I tested the default SDL project CB creates and then moved the settings
across to mine. For the record, this is what the Code::Blocks IDE uses to
compile SDL applications on Windows XP 32:*
Libraries:*

  • mingw32
  • SDLmain
  • SDL.dll
  • user32
  • gdi32
  • winmm
  • dxguid

To which I added:

  • SDL_image

Search directories:

  • compiler = C:\path\to\SDL\include
  • linker = C:\path\to\SDL\lib

Thanks for the help, I am indebted to you :slight_smile: Maybe I can post about
Mysterious Castle on my blog-that-nobody-reads or donate some of my immense
student wealth to your cause :wink: Seriously though, let me know if you need a
hand with something.

As for “Bugger!” it’s rather a long story. I went to Paris around Easter to
visit a guy I’d met online, who more or less works for the French government
organising grants for “serious games”. Nice guy, but just before I went he
realised he’d double-booked me with a game-jam he was supposed to be
hosting, so I decided to come and participate instead. It was mobile
platforms only, and we had to make an “art game”, so I was a bit out of my
depth. That said there were almost no programmers around, so I ended up
teaching myself to use the Android framework and writing our App all by
myself in 48 hours. Pretty psyched to have finished at all, but astonished
to end up winning the prize.

Long story short I got hired to work for the group one of our artists is
part of. Again I’m the sole developer (give or take a Game Maker programmer
ie. not really a programmer), so being a Linux-junkie I managed to talk them
out of Unity and into SDL/C++. Needless to say I’ve been working my ass off
ever since trying to justify the risk, and so “Bugger!” hasn’t been getting
much attention :’-( In fact, I haven’t really worked on it since before my
exams started (just finished my Bsc. in Computer Science). I’m certainly
hoping to get back to it though!

William

On 2 August 2011 21:08, Jeremy Jurksztowicz wrote:

I found out that I need to link to the following libraries when compiling
an SDL app with mingw:
Imm32, Winmm, Ole32, oleaut32, uuid, Version, Gdi32

I haven’t got the game running yet, but after an afternoon of googling I
managed to compile and link it successfully.
I put up the precompiled SDL 1.3 on my dropbox HERE
http://dl.dropbox.com/u/32525776/sdl-1.3.5581-x86-generic.rar for anyone
to download. It’s 32bit for mingw, I don’t even know what features were
compiled into it, but I’ll take whatever. Thanks Andreas!

Hey, Wilbefast, we keep bumping into each other on the net! It’s
eclectocrat, the Mysterious Castle guy. How’s the debugging game going, you
stopped updating the devlog at TIGSource.

On Tue, Aug 2, 2011 at 6:06 PM, wilbefast <@William_Dyce> wrote:

**
I just had a crack at this myself, in order to port my App to Windows as
well as Linux and Android. I’m following this guide:

http://blog.pantokrator.net/2006/08/08/setting-up-msysmingw-build-system-for-compiling-sdlopengl-applications/

Everything installed and set up fine, tell I come to the classic
./configure && make && make install part for SDL 1.3:

William at BELIAL /SDL
$ ./configure --prefix=/mingw
./configure: line 1397: syntax error near unexpected token ‘acinclude’
./configure: line 1397: ‘AC_CONFIG_MACRO_DUR**’

Keep me posted of any progress you guys make with this: I’ll keep trying,
but if it won’t cooperate I might try with Cygwin instead.

What a clusterfuck of an operating system windows is to develop for. Sigh.

William


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


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

This looks like an issue with your autotools. What was the output when you ran autogen.sh to create your configure file?

Also - the operating system is hardly to blame for you not setting up your environment according to SDL’s requirements (which frankly aren’t clearly stated anywhere that I know of) :smiley:

You’re welcome eclectocrat… This download (and all the other ones) were already available on my website (http://ginkgobitter.dyndns.org) that I posted on the other thread (http://forums.libsdl.org/viewtopic.php?t=6593) :wink: You’ll be able to get updates there too whenever I check out new revisions.
Alternatively you can always try Sockerdrickan website (http://www.amyto.com) for more current builds (which were the ones I used before I made my own - he hadn’t updated them in a while).
What concerns what is compiled in - everything that is related to windows. Since I do not know what people actually want to use, everything I released contains all possible dependencies. Same with SDL_image.

Andreas.

I have never had serious issues with this when using msys.
The only issue I have ever had with this was SDL using Win32 APIs not defined by mingw-supplied win32 headers.------------------------
EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/

Maybe I should try running a simpler makefile to see if that works… need
to get on with other things though :-SOn 3 August 2011 10:20, Nathaniel J Fries wrote:

**
I have never had serious issues with this when using msys.
The only issue I have ever had with this was SDL using Win32 APIs not
defined by mingw-supplied win32 headers.


EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/


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

I don’t know if this helps, but I have a fairly clean install of
MinGW+MSYS on Windows 7 (along with pkg-config, too), and to build SDL
1.3, I did the following:
$ hg clone http://hg.libsdl.org/SDL
$ cd SDL
$ ./configure
$ make # to note, I used -j 2 to allow make to use threads - I don’t
know if that would affect the build or not, but everything seems okay
$ make install

Everything went as expected without any issues.
-AlexOn Tue, Aug 2, 2011 at 7:41 AM, ginkgobitter wrote:

You’re welcome eclectocrat… This download (and all the other ones) were already available on my website that I posted on the other thread You’ll be able to get updates there too whenever I check out new revisions.
Alternatively you can always try Sockerdrickan website for more current builds (which were the ones I used before I made my own - he hadn’t updated them in a while).
What concerns what is compiled in - everything that is related to windows. Since I do not know what people actually want to use, everything I released contains all possible dependencies. Same with SDL_image.

Andreas.


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