News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

restunts: someone able to build restunts-sdl?

Started by llm, February 27, 2025, 10:19:32 AM

Previous topic - Next topic

llm

using latest VS2022/x86 + SDL1 libs/includes are found (sitting under src/sdl)
but the build fails with some errors

im a long time (>20 years C/C++,... developer) so im normaly knowing very well what im doing - but i never built that project before

S:\src\restunts>make restunts-sdl
MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
        cd sdl
        if exist makefile make
MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
        cl /MD /c /EHsc /Is:\src\sdl\include /I../c /DRESTUNTS_SDL /Zi /Fobuild\main.obj main.cpp
Microsoft (R) C/C++-Optimierungscompiler Version 19.43.34808 für x86
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

main.cpp
S:\src\restunts\c\math.h(56): error C2143: Syntaxfehler: Es fehlt "," vor "*"
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\cstdlib(24): error C2039: "fabs" ist kein Member von "`global namespace'".
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\cstdlib(24): error C3861: "fabs": Bezeichner wurde nicht gefunden.
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\cstdlib(28): error C2039: "fabsf" ist kein Member von "`global namespace'".
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\cstdlib(28): error C3861: "fabsf": Bezeichner wurde nicht gefunden.
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\cstdlib(32): error C2039: "fabsl" ist kein Member von "`global namespace'".
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\cstdlib(32): error C3861: "fabsl": Bezeichner wurde nicht gefunden.
S:\src\restunts\c\shape3d.h(42): error C2732: Bindungsangaben widersprechen vorheriger Angabe für "polarAngle"
S:\src\restunts\c\shape3d.h(42): note: Siehe Deklaration von "polarAngle"
main.cpp(192): warning C4838: Konvertierung von "unsigned int" zu "long" erfordert eine einschränkende Konvertierung
main.cpp(221): warning C4838: Konvertierung von "int" zu "char" erfordert eine einschränkende Konvertierung
main.cpp(222): warning C4838: Konvertierung von "int" zu "char" erfordert eine einschränkende Konvertierung
main.cpp(377): warning C4838: Konvertierung von "int" zu "short" erfordert eine einschränkende Konvertierung

** error 2 ** deleting build\main.obj

** error 1 ** deleting restunts-sdl

S:\src\restunts>

someone got a working build and can tell me what to do? what compiler version is used?
in the make file is cl called (i think the microsoft cl.exe compiler) - but i don't know
if that initally was a very old version or something


HerrNove

#1
Similar problem for me. Building under Linux/Wine, which does not provide `cl`, I get

Can't recognise 'cl /MD /c /EHsc /Is:\src\sdl\include /I../c /DRESTUNTS_SDL /Zi
/Fobuild\main.obj main.cpp' as an internal or external command, or batch script.

I guess "calvin" forgot to pack his cl.exe in the tools.

Moreover: the line cl.exe stumbles on in your attempt is

void mat_mul_vector2(struct VECTOR* invec, struct MATRIX far* mat, struct VECTOR* outvec);
So almost certainly it does not like the "far" keyword. Now, in the code there are some constructions such as

#ifdef RESTUNTS_SDL
#define far
#endif

but either RESTUNTS_SDL is not defined (problem in the makefile) or someone forgot to add this snippet to math.h.

llm

QuoteI guess "calvin" forgot to pack his cl.exe in the tools.

i think the cl.exe is a more recent microsoft cl compiler - so VS2010-VS2013 or something of that time

this compiler-suite is GBs in size and it makes not sense to add it to the repo

Quote...problem in the makefile...

i think thats the case - this stuff just needs a fix :)

Matei

If it runs in DosBOX, Stunts uses SDL. Solved.