kgsws / doom_ace

DOS Doom code execution
GNU Lesser General Public License v2.1
114 stars 3 forks source link

Error compiling the engine directory on msys2 #2

Closed LuciferSam8086 closed 1 year ago

LuciferSam8086 commented 1 year ago

Hi, I was curious to try the latest version of the engine, but under msys2, when I try to compile the "engine" directory, I get this error after I launch make

In file included from main.c:4:
engine.h:371:26: error: expected identifier or ‘(’ before ‘[’ token
  371 |         uint32_t __unused[4+1];
      |                          ^
make: *** [<builtin>: main.o] Error 1

Is there an error, or compiling under msys2 is not supported?

Almost forgot this is the output of gcc -v command:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-msys/11.3.0/lto-wrapper.exe
Target: x86_64-pc-msys
Configured with: /c/S/gcc/src/gcc-11.3.0/configure --build=x86_64-pc-msys --prefix=/usr --libexecdir=/usr/lib --enable-bootstrap --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --with-arch=x86-64 --with-tune=generic --disable-multilib --enable-__cxa_atexit --with-dwarf2 --enable-languages=c,c++,fortran,lto --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --disable-libssp --disable-win32-registry --disable-symvers --with-gnu-ld --with-gnu-as --disable-isl-version-check --enable-checking=release --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible --enable-libstdcxx-filesystem-ts
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.3.0 (GCC)
LuciferSam8086 commented 1 year ago

I tried cygwin with GCC 10.2, and finally, I can compile the file. The "exploit.exe" is a exploit.exe: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows

How do I run this for making the wad file? Do I need a Windows 95/98 machine? I tried to run the file on a 32 bit Windows XP VM and on my 64 bit Windows 10 machine without success. Thank you!

Edit : nevermind the wad is the .bin file. What's the exe file for? Anyway closing the issue.

kgsws commented 1 year ago

ELF (or EXE) file is converted to BIN. Compiler always produces ELF (EXE) but you are not supposed to run it - it's not a valid application. Rename BIN to WAD and import code.lmp as ACE_CODE in wad editor of your choice. Then check out BEWARE section in readme.