Author Topic: Games with older SDL and FSLIB  (Read 4232 times)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5481
  • Karma: +133/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #45 on: July 19, 2025, 06:55:02 am »
Hi Martin, pushed my changes. The package looks fine except I've updated the executable to use -Zhigh-mem, attached.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5376
  • Karma: +45/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Games with older SDL and FSLIB
« Reply #46 on: July 19, 2025, 07:14:04 pm »
Hello Dave

The older one is working fine, this new one gives me an error that can not find data/sounds.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5481
  • Karma: +133/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #47 on: July 20, 2025, 01:14:10 am »
Hello Dave

The older one is working fine, this new one gives me an error that can not find data/sounds.

Regards

Guess I should have tested :)
It's weird as the error is,
Code: [Select]
H:\cuyo-2.1.0>cuyo.exe
Error: Could not find "sounds/leftright.wav".
Tried the following places:
  ./data/sounds/leftright.wav
And
Code: [Select]
H:\cuyo-2.1.0>ls ./data/sounds/leftright.wav
./data/sounds/leftright.wav

So it is there and should work.
Hmm, rebuilding without -Zhigh-mem and it works. Just use the original binary as it seems the -Zhigh-mem is breaking something, perhaps the combination of a GCC binary and OW DLL.
Edit: updated compile.os2 removing the -Zhigh-mem
« Last Edit: July 20, 2025, 01:24:33 am by Dave Yeo »

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5376
  • Karma: +45/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Games with older SDL and FSLIB
« Reply #48 on: July 20, 2025, 06:04:50 pm »
Thanks Dave

I uploaded the package to Hobbes (the version that was working fine).

Just for my own learning, how do you run the automake script for this case? In case I want to have a compile.cmd command, what would you include there?

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5481
  • Karma: +133/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #49 on: July 20, 2025, 09:05:32 pm »
In this case and many others, simply
Code: [Select]
sh autogen.shSometimes autogen.sh runs configure at the end so you can pass the configure arguments to autogen.sh.
If you look at Cuyo's autogen.sh, you see the usual minimal autotools series of commands. Some also have libtool.
Once it has been run to use our autotools port, it usually doesn't need to be run again and configure takes care of creating the makefile's from the makefile.in's, which were created by automake from the makefile.am's
So basically configure --arguments, then make for Cuyo and most autotools projects.
for GAME-SDL-PUZZLE-Cuyo, see compile.os2,
Code: [Select]
sh ./configure --disable-nls --with-sdl-prefix=H:/tmp/SDL 'LDFLAGS=-Zomf' 'LIBS=-lz -lintl'
make pkgdatadir=./data
Of course SDL needs to be setup for GCC as explained earlier in the thread and the above adjusted for your environment.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5376
  • Karma: +45/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Games with older SDL and FSLIB
« Reply #50 on: July 21, 2025, 05:07:03 pm »
Thanks Dave

I tried this:
Code: [Select]
[E:\DEV\5TRYING\GAME-SDL-PUZZLE-CUYO]sh ./configure --disable-nls --with-sdl-pre
fix=C:/usr/include/SDL1 'LDFLAGS=-Zomf' 'LIBS=-lz -lintl'
checking for a BSD-compatible install... /@unixroot/usr/bin/install.exe -c
checking whether build environment is sane... yes
./configure: 1: eval: /bin/sh: not found
configure: WARNING: 'missing' script is too old or missing
checking for a race-free mkdir -p... /@unixroot/usr/bin/mkdir.exe -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for g++... g++
checking whether the C++ compiler works... no
configure: error: in 'E:/DEV/5TRYING/GAME-SDL-PUZZLE-CUYO':
configure: error: C++ compiler cannot create executables
See 'config.log' for more details

[E:\DEV\5TRYING\GAME-SDL-PUZZLE-CUYO]make pkgdatadir=./data
make: *** No targets specified and no makefile found.  Stop.

I'm not sure what can be wrong. I have a different SDL1 path just in case.

Regards
« Last Edit: July 21, 2025, 05:09:51 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5481
  • Karma: +133/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #51 on: July 21, 2025, 05:48:06 pm »
Hi Martin, here is the error,
Code: [Select]
configure:3256: checking whether the C++ compiler works
configure:3278: eval g++ -Wall -W -ansi   -Zomf conftest.cpp -lz -lintl >&5
weakld: cannot open library file 'C:\usr\lib\intl_s.a'.
emxomfld: weak prelinker failed. (rc=8)
configure:3282: $? = 1
configure:3323: result: no

No -lintl, or rather intl_dll.a. Libintl is part of gettext so you need to install the gettext-devel package. You will also need the zlib-devel package for libz (libz_dll.a)
Missing libraries on our system usually result in weakld looking for the static version in /usr/lib.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5481
  • Karma: +133/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #52 on: July 21, 2025, 05:58:36 pm »
Thanks Dave

I tried this:
Code: [Select]
[E:\DEV\5TRYING\GAME-SDL-PUZZLE-CUYO]sh ./configure --disable-nls --with-sdl-pre
fix=C:/usr/include/SDL1 'LDFLAGS=-Zomf' 'LIBS=-lz -lintl'

BTW, did you really install SDL_1-2-15_2020-10-05.zip to /usr/include?
I have,
Code: [Select]
Directory of H:\tmp\SDL

 7-14-25  3:00p         <DIR>    124 ----  .
 7-21-25  8:53a         <DIR>    441 ----  ..
 6-23-25  9:52p         <DIR>      0 a---  bin
 7-14-25  3:00p         <DIR>    124 ----  dll
 7-14-25  3:00p         <DIR>    124 ----  h
 7-14-25  3:00p         <DIR>    124 ----  lib
 2-09-16  2:08a         1,944    124 a---  readme.os2
 3-03-16  3:10p           844    124 a---  SDL-1.2.15-20160303.txt
 3-03-16  3:12p           928    124 a---  SDL-1.2.15-src-20160303.txt
 2-09-16  1:35a         2,615    124 a---  sdl.ini
 4-27-21  8:44p    31,320,734    124 a---  SDL_1-2-15-src-20201005.zip
       11 file(s)  31,327,065 bytes used

Directory of H:\tmp\SDL\bin

 6-23-25  9:52p         <DIR>      0 a---  .
 7-14-25  3:00p         <DIR>    124 ----  ..
 6-29-25  5:27p         1,278    124 a---  sdl-config
        3 file(s)       1,278 bytes used
...
Code: [Select]
Directory of H:\tmp\SDL\lib

 7-14-25  3:00p         <DIR>    124 ----  .
 7-14-25  3:00p         <DIR>    124 ----  ..
10-05-20  9:07a       108,544    124 a---  sdl12.lib
10-05-20  9:07a        21,504    124 a---  sdlimage.lib
10-05-20  9:07a        41,984    124 a---  sdlmixer.lib
10-05-20  9:07a        22,016    124 a---  sdlnet.lib
10-05-20  9:07a        10,240    124 a---  sdlsound.lib
10-05-20  9:07a        25,600    124 a---  sdlttf.lib
 6-23-25  9:23p        21,504    124 a---  SDL_image.lib
 6-23-25  9:23p        41,984    124 a---  SDL_mixer.lib
 6-24-25  8:31p        25,600    124 a---  SDL_ttf.lib
       11 file(s)     318,976 bytes used
...
and my current sdl-config
Code: [Select]
#!/bin/sh

# Edit the prefix below to reflect your environment

prefix=h:/tmp/SDL
exec_prefix=$prefix
exec_prefix_set=no
libdir=$prefix/lib

usage="\
Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
#usage="\
#Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"

if test $# -eq 0; then
      echo "${usage}" 1>&2
      exit 1
fi

while test $# -gt 0; do
  case "$1" in
  -*=*) optarg=`echo "$1" | LC_ALL="C" sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) optarg= ;;
  esac

  case $1 in
    --prefix=*)
      prefix=$optarg
      if test $exec_prefix_set = no ; then
        exec_prefix=$optarg
      fi
      ;;
    --prefix)
      echo $prefix
      ;;
    --exec-prefix=*)
      exec_prefix=$optarg
      exec_prefix_set=yes
      ;;
    --exec-prefix)
      echo $exec_prefix
      ;;
    --version)
      echo 1.2.15
      ;;
    --cflags)
      echo -I$prefix/h -I$prefix/h/SDL
      ;;
    --libs)
      echo -L$prefix/lib -Zomf -lsdl12
      ;;
#    --static-libs)
##    --libs|--static-libs)
#      echo -L/@unixroot/usr/lib  -lSDL   -lm
#      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done

I changed the --cflags section as some projects look for SDL.h and others for SDL/SDL.h
« Last Edit: July 21, 2025, 06:01:30 pm by Dave Yeo »