Open trofi opened 9 months ago
@trofi Hey man, are you able to compile on Win? the Inno is not creating the setup for me
make[2]: Entering directory '/d/GIMX test/GIMX-build/windows/GIMX/shared/gimxcontroller'
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -D__USE_MINGW_ANSI_STDIO=0 -I../ -DGLOG_NAME=gimxcontroller -c -o src/controller.o src/controller.c
src/controller.c: In function 'controller_get_axis_index':
src/controller.c:361:10: error: the comparison will always evaluate as 'true' for the address of 'name' will never be NULL [-Werror=address]
361 | if(controllers[C_TYPE_SIXAXIS]->axes[i].name)
| ^~~
In file included from src/controller.c:6:
src/../include/controller.h:46:14: note: 'name' declared here
46 | const char name[AXIS_NAME_MAX_SIZE];
| ^~~~
cc1.exe: all warnings being treated as errors
make[2]: [
I did not try windows
but on linux
we have to workaround a similar error.
It is caused by use of blanket -Werror
in Makedefs
files in a few places. Try removing the -Werror
from there.
In nixpkgs
we pass extra compiler flags to workaround it as: -Wno-error=address -Wno-error=deprecated-declarations -Wno-error=use-after-free
Any chance you can send me the updated one? I want to compile the win version. Linux worked just fine. It's been 5 days straight and I'm unable to compile it in Windows (tried adding missing headers, removing -Werror- and much more, but I keep digging a hole.
Eclipes IDE Mingw64 and GCC 13.xx Downloaded all the missing libraries (SDL, CURL and others).
Any guidance really would be appreciated.
@trofi I also have countless missing headers. I added them to the Path, and got a lot of them resolved. Did you had to point to the include folders and such?
Thanks
No, this PR (and disabled warnings) is all I needed to get it to build.
Two simple changes for
gcc-13
compatibility:Add missing headers reported by
gcc-13
controller.c: fixadapter_detect()
prototype consistency