Jump to content

Compile raine in Windows


Recommended Posts

Hi tux! any advice how to compile in windows?


In DOS with djgpp was easy, but i did not have good luck with mingw in windows



Im using XP x64 (i have mingw 32bits and mingw64) but my test are in 32bits compiler



Thanks in advance for any tips

Link to comment
Share on other sites

About that you were the one who asked the pre-compiled libs weren't you ? I never got any feedback about that !

The main (only ?) difference between djgpp and the other platforms is that there is alot more dependancies with the other platforms. You got a pretty clear message when you are missing one. It's long and tedious to compile everything when you are starting from scratch but the libs need to be compiled only once.

Some of these libs are hard to compile as a dll, but you are not obliged to make dlls here, and it will work the same way in raine.

Without any precise problem I can't tell anything anymore !

Link to comment
Share on other sites

Hi tux


I dont remember asking precompiled libs... maybe is not me!! (if is me... please send me the post, and I will give you feedback...and sorry)



About mingw


first i set the OStype



export OSTYPE=windows



then make


$ make
Building Raine, Fully optimized version with gcc for windows CPU=pentium-m
dependencies : if you get an error here, install the required dev package
Compiling source/neocd/cdrom.c...
In file included from source/raine.h:32:0,
                 from source/neocd/cdrom.c:2:
source/sdl/compat.h:85:6: error: conflicting types for 'strlwr'
 void strlwr(char *s);
In file included from source/raine.h:18:0,
                 from source/neocd/cdrom.c:2:
c:\src\mingw\include\string.h:102:39: note: previous declaration of 'strlwr' was
 _CRTIMP char* __cdecl __MINGW_NOTHROW strlwr (char*);
make: *** [windows-sdl/object/neocd/cdrom.o] Error 1





I have SDL and libpng, Im sure it works, because i can compile dosbox and scummvm witthout problems

Link to comment
Share on other sites

Maybe it's not you, anyway it was in the older forum so I don't have the post here anyway...

1st I have not used mingw in ages, I have been compiling windows binaries from linux for years now, so maybe I'll have forgotten a few things.

You need to use the msys shell, install it if it's not the case, normally if you use it OSTYPE will be defined to msys without doing anything, that's what you need 1st.

Do that and post again if you have some more problems !


For the strlwr definition, it had disappeared from the mingw headers a long time ago, you are sure you are using some recent mingw version ?

Well if it's really the latest stable mingw version and you really have a conflict here, then you'll have to comment out strlwr from source/sdl/compat.h and source/sdl/compat.c.

For info my string.h is from mingw runtime (called mingwrt here : https://sourceforge.net/projects/mingw/files/MinGW/Base/mingwrt/ ) version 3.18. From my crosscompile environment, 3.18 is said stable, 3.20 and 3.20.2 are "testing" (maybe still in this state because not enough testers) and is said unstable, so I think I'll keep 3.18 for now.


While I am at it for the dependancies you'll need :

libpng (well you have it obviously even if it's not the latest version, if you get an error while compiling related to png stuff then it's too old)

sdl (latest is 1.2.15, you can keep 1.2.14 if you want)



sdl-sound (preferably the mercury one because the latest "stable" one is unable to read mp3s containing id3 tags which can be a problem)



And then depending on the audio cdecs and the pictures formats you want, you might need some more libs (libjpeg, libvorbis, libogg, libflac, libmpg123 if using mercury version of sdl-sound, otherwise it's an outdated mp3 lib I forgot about, etc...).

And you can find the pre-compiled stuff there : http://raine.1emulation.com/download/dev.html

sorry I didn't show the versions used, just the dates the packages were made that's all. I never had any feedback about these packages, but if they are correct you just need to unpack them at the root of your mingw installation, below the include and lib directories.

Good luck !

Edited by Tux
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...