Previous Thread
Next Thread
Print Thread
#23137 06/12/06 08:15 PM
Joined: Jun 2006
Posts: 8
P
Junior Member
Junior Member
P Offline
Joined: Jun 2006
Posts: 8
(if this turns out to be a silly-assed question, just delete it smile )

Is SDL Mame supposed to compile now under Windows using Mingw?

I figured that would be a good starting point, rather than to assume, because while I've seen a couple compile notes for Mac and Linux, nothing much about Windows and to get it as far as I can, it takes a lot of work it seems it otherwise shouldn't.

I can get the compile to get to where it tries to link mame.exe (with much finagling, which makes me wonder if I haven't gone wrong on some very fundamental level) but bombs out rather spectacularly having problems with an SDL componant. I can add a bunch of details if needed, but have a sinking feeling they aren't. :p

#23138 06/12/06 08:32 PM
Joined: Mar 2001
Posts: 17,249
Likes: 265
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,249
Likes: 265
It's not yet fully supported on MinGW, but it will be in the future. If you're having trouble, make sure you set SUBARCH=win32 in the makefile. Also, make sure you go to http://www.libsdl.org/download-1.2.php and get the development package for MinGW. Extract it to it's own directory (by default C:\SDL-1.2.10\) then copy the contents of SDL-1.2.10\include\ to your MinGW\include (make sure to include subdirectories!), then do the same with the lib and bin folders. You can ignore the "test" and "build-scripts" stuff.

#23139 06/13/06 02:06 AM
Joined: Jun 2006
Posts: 8
P
Junior Member
Junior Member
P Offline
Joined: Jun 2006
Posts: 8
I started over (after breaking things from last night) and here's what I've done:

I unpacked mingw-mame-20060210.exe and dx80_mgw.zip, put the SDL includes in include/SDL, the rest as they came (bin in bin, lib in lib).

Keeping the makefile as it is (already set to compile for windows). Mame 106 compiles no problem, as does 106u1.

For sdlmame I edited the makefile to change the subarch to win32, and commented the PM optimization line (I have an Athlon; for this run I have no optimization set.. I'll start a compile with Athlon optimization after I post this). I left the rest as-is (the debuggers commented out, etc). Then I get this:


Compiling src/cpu/m68000/m68kmake.c...
[gcc command line deleted for brevity, I can post it if it'll help]
Generating M68K source files...
obj/mame/cpu/m68000/m68kmake.exe obj/mame/cpu/m68000 src/cpu/m68000/m68k_in.c
process_begin: CreateProcess((null), obj/mame/cpu/m68000/m68kmake.exe obj/mame/c
pu/m68000 src/cpu/m68000/m68k_in.c, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: *** [obj/mame/cpu/m68000/m68kops.h] Error 2


Copying m68kmake.exe from my mame106u1 obj/cpu/m68000 directory gets the sdlmame compile to continue... Then near the end: (edited because the stdout and stderr are incredibly long, again if needed I'll post them)


Linking mame.exe...
gcc -std=gnu89 -Isrc -Isrc/includes -Isrc/sdl -DNDEBUG -march=pentium -O3 -fomit-frame-pointer -Wall -Wno-sign-compare -Wpointer-arith -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wundef -Wformat-security -Wwrite-strings -Wdeclaration-after-statement -Isrc/expat -Isrc/zlib -DSDLMAME_WIN32 -Isrc/debug -WO -s [lots of .o and .a omitted] -lSDL -o mame.exe
obj/mame/sdl/sound.o(.text+0x182):sound.c: undefined reference to `sleep'
obj/mame/sdl/blit.o(.text+0x1c7d):blit.c: undefined reference to `asmblit_header'
[tons more of undefined references in blit.o]
obj/mame/sdl/asmblit.o(.data+0x8ae):src/sdl/asmblit.as: undefined reference to `asmblit_srcheight'
[tons more of undefined references in asmblit.o]
/mingw/lib/libmingw32.a(main.o)(.text+0x106):main.c: undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
mingw32-make: *** [mame.exe] Error 1

#23140 06/13/06 03:52 AM
Joined: Mar 2001
Posts: 17,249
Likes: 265
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,249
Likes: 265
Again, you're not supposed to actually try to compile on MinGW yet unless you're guru enough to fix it :-)

#23141 06/13/06 04:02 AM
Joined: Jun 2006
Posts: 8
P
Junior Member
Junior Member
P Offline
Joined: Jun 2006
Posts: 8
Ah, that's probably not me. I've been having looks here and there, but whatever the deal is, it's beyond my meager abilities.

I took your last reply to be along different lines... I'll just look forward to when it's more supported. And if nothing else, fiddling with it was fun and informative. (I'm even more amazed that Mame works at all :p )

#23142 06/15/06 03:29 AM
Joined: Jun 2006
Posts: 8
P
Junior Member
Junior Member
P Offline
Joined: Jun 2006
Posts: 8
Woohoo, I got it to work! (with a mixture of hacks and kludges and with very scratchy sound)

I'm not much of a programmer, so I'll spare what I did since it certainly isn't the correct way to do it, but thought I'd post anyway. (and yes, I'm terribly proud of myself heh) If there's something (mundane) I can help with, though, I'd love to.


Moderated by  R. Belmont 

Link Copied to Clipboard
Who's Online Now
2 members (Dorando, Pernod), 108 guests, and 0 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,345
Posts122,343
Members5,082
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Powered by UBB.threads™ PHP Forum Software 8.0.0