MorsGames / sm64plus

A fork of sm64-port that focuses on QoL improvements and customizability.
https://mfgg.net/index.php?act=resdb&param=02&c=2&id=38190
456 stars 33 forks source link

Build error src/pc/pc_main.c:200:46: error: invalid type argument of '->' (have 'int') #21

Closed ThatsRedacted closed 3 years ago

ThatsRedacted commented 3 years ago

v1.1.2.1 Linux 5.10.26-1-MANJARO

Build fails at src/pc/pc_main.c

echo >> build/us_pc/textures/water/jrb_textures.0B800.rgba16.inc.c gcc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -D_LANGUAGE_C -DVERSION_US -DNON_MATCHING -DAVOID_UB -DTARGET_LINUX pkg-config --cflags libusb-1.0 -DNO_SEGMENTED_MEMORY -DUSE_SYSTEM_MALLOC -DENABLE_OPENGL -I/usr/include/SDL2 -D_REENTRANT -DWIDESCREEN -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -march=native -o build/us_pc/bin/water.o bin/water.c src/pc/pc_main.c: In function 'main_func': src/pc/pc_main.c:199:47: warning: comparison between pointer and integer 199 | if (strcpy(workingdir, getenv("HOME"))[0] == "\0") { | ^~ src/pc/pc_main.c:199:47: warning: comparison with string literal results in unspecified behavior [-Waddress] src/pc/pc_main.c:200:28: warning: implicit declaration of function 'getpwuid'; did you mean 'geteuid'? [-Wimplicit-function-declaration] 200 | strcpy(workingdir, getpwuid(getuid())->pw_dir); | ^~~~ | geteuid src/pc/pc_main.c:200:46: error: invalid type argument of '->' (have 'int') 200 | strcpy(workingdir, getpwuid(getuid())->pw_dir); | ^~ make: *** [Makefile:775: build/us_pc/src/pc/pc_main.o] Error 1

cgaldieri commented 3 years ago

Try using the Dev Branch and run again, it worked for me, i use linux mint

ThatsRedacted commented 3 years ago

Yeah, dev branch works fine.

Thanks.