NakedAVP icon indicating copy to clipboard operation
NakedAVP copied to clipboard

Error compiling in linux (Endeavour OS)

Open orderorder opened this issue 1 year ago • 8 comments

NakedAVP/src/files.c:34:26: error: el retorno de ‘int’ desde una función con tipo de retorno ‘char *’ crea un puntero desde un entero sin una conversión [-Wint-conversion]
   34 | #define GetBasePath()    SDL_GetPrefPath("", "AliensVsPredator");
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

orderorder avatar Jun 01 '24 09:06 orderorder

having same issue and some others is it possible someone makes an AUR package?

purplekairi1312 avatar Apr 03 '25 19:04 purplekairi1312

I'll look into it and fix what's needed 🙏

atsb avatar Apr 09 '25 21:04 atsb

I just tried it on the absolute latest SDL3 from github. Compiles without issues.

atsb avatar Apr 10 '25 08:04 atsb

I just tried it on the absolute latest SDL3 from github. Compiles without issues.

[ 93%] Building CXX object CMakeFiles/avp.dir/src/win95/sprchunk.cpp.o
[ 94%] Building CXX object CMakeFiles/avp.dir/src/win95/string.cpp.o
[ 94%] Building C object CMakeFiles/avp.dir/src/win95/texio.c.o
/home/grim-reaper/Descargas/NakedAVP/src/win95/texio.c: En la función ‘SpriteResizing’:
/home/grim-reaper/Descargas/NakedAVP/src/win95/texio.c:894:54: error: asignación a ‘int *’ desde un tipo de puntero ‘intptr_t *’ {también conocido como ‘long int *’} incompatible [-Wincompatible-pointer-types]
  894 |                                         txf_imageptr = &txaf->txf_image;
      |                                                      ^
make[2]: *** [CMakeFiles/avp.dir/build.make:3005: CMakeFiles/avp.dir/src/win95/texio.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/avp.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

purplekairi1312 avatar Apr 17 '25 13:04 purplekairi1312

Ok, what is Endeavour OS and what GCC version does it use? There is clearly a difference between Ubuntu LTS and this.

atsb avatar Apr 17 '25 16:04 atsb

See here: https://github.com/atsb/NakedAVP/pull/12/files

atsb avatar Apr 17 '25 22:04 atsb

Ok, what is Endeavour OS and what GCC version does it use? There is clearly a difference between Ubuntu LTS and this.

I do not use Endeavour OS myself I use vanilla Arch GNU/Linux EndeavourOS is based on Arch GNU/Linux (is just a calamares installer really) as you may already know Arch GNU/Linux is a rolling distro, therefore is always using latest software

purplekairi1312 avatar Apr 23 '25 18:04 purplekairi1312

Hmmm so it's using a way way newer version of GCC then.. not really sure how to fix this until I get to that version since as a dev, I target the lowest common denominator rather than bleeding edge, so it compiles on the vast majority of systems.

atsb avatar Apr 23 '25 19:04 atsb