OS/2, eCS & ArcaOS - Technical > Programming
Compiling a SDL Game (2023)
Martin Iturbide:
--- Quote from: Dave Yeo on August 14, 2023, 06:38:37 am ---Well, best would be to fix SDL2_mixer to use lib-libxmp, which builds fine using cmake or OpenWatcom and makefile.os2, haven't tested if the OW DLL is compatible with GCC.
I just tried that,but SDL2_mixer wants to dynamically load modplug_dll.a instead of modplug1.dll or the planned xmp4.dll. I must have built and installed modplug last year and forgot about it :)
Seems SDL2_mixer is hard coded for modplug
Another option is to create a rocksndiamonds.def declaring it a PM app and link it in.
Quick fix is to do,
--- Code: ---K:\work\rocksndiamonds>exehdr /PMTYPE:PM rocksndiamonds.exe
--- End code ---
--- End quote ---
Hi Dave
I did the "exehdr /PMTYPE:PM rocksndiamonds.exe" but I can not see any difference.
I got this:
--- Quote ---[C:\DEV\5TRYING\ROCKSNDIAMONDSREL]exehdr /PMTYPE:PM rocksndiamonds.exe
Operating System/2 Executable File Header Utility
Version 4.01.003 Dec 11 2003
Copyright (C) IBM Corporation 1988-2003
Copyright (C) Microsoft Corp. 1988-1992.
All rights reserved.
Module: rocksndiamonds
Module type: Program
Number of memory pages: 000001df (479)
Initial CS:EIP: object 1 offset 00000000
Initial SS:ESP: object 3 offset 00100000
Automatic data object: 2
Stack allocation: 00100000 (1048576) bytes
no. virtual virtual map map flags
address size index size
0001 00010000 00196720 00000001 00000197 EXECUTABLE, READABLE, 32-bit
0002 001b0000 03f14f00 00000198 00000048 READABLE, WRITEABLE, 32-bit
0003 040d0000 00100000 000001e0 00000000 READABLE, WRITEABLE, 32-bit
--- End quote ---
But I had also produced a preliminary release for people to test it, and if everything is fine I will put it on hobbes.
Regards
Dave Yeo:
Hi Martin,
The exehdr command should have turned the exe into a PM app with no console, which I see your build does. Perhaps you added a DEF to get the same results, in which case you could also add bldlevel info.
The binary seems to work fine here.
The text file has a couple of issues, the reference to "SET INCLUDE=C:\usr\include" could have "or similar" added, not everyone installs to C: The link at the bottom is for mirrormagic instead of rocksndiamonds.
Also I don't see any source or patches, I assume you will add that.
I'm still trying to get a version of sdl2 mixer with mod support
David McKenna:
Thanks Martin! Seems to work well here...
Regards,
Martin Iturbide:
Thanks for the feedback.
--- Quote from: Dave Yeo on August 15, 2023, 06:58:01 am ---Hi Martin,
The exehdr command should have turned the exe into a PM app with no console, which I see your build does. Perhaps you added a DEF to get the same results, in which case you could also add bldlevel info.
The binary seems to work fine here.
The text file has a couple of issues, the reference to "SET INCLUDE=C:\usr\include" could have "or similar" added, not everyone installs to C: The link at the bottom is for mirrormagic instead of rocksndiamonds.
Also I don't see any source or patches, I assume you will add that.
I'm still trying to get a version of sdl2 mixer with mod support
--- End quote ---
I want to do that little details, but the thing that I don't know what is where to change the makefile to include a "rocksndiamonds.def" file.
The source code it's on Github, but there is was no patches needed on the source code to compile:
- https://github.com/OS2World/tAME-SDL-STRATEGY-RocksnDiamonds
- https://github.com/OS2World/GAME-SDL-STRATEGY-MirrorMagic
Regards
Dave Yeo:
Yea, I got the OS/2 patch accepted a couple of years ago, and originally many years ago for the X version. It was the first program I ever ported.
A simple hack, create a src/rocksndiamonds.def and add this to the makefile
--- Code: ---diff --git a/src/Makefile b/src/Makefile
index b7289d01..6460d9d3 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -82,7 +82,7 @@ endif
ifeq ($(shell uname -s),OS/2) # compiling on OS/2
PROGNAME = ../$(PROGBASE).exe
-EXTRA_LDFLAGS = -Zomf -Zbin-files -Zmap -lcx -Zhigh-mem
+EXTRA_LDFLAGS = -Zomf -Zbin-files -Zmap -lcx -Zhigh-mem rocksndiamonds.def
endif
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version