DarioSamo / sm64rt

Fork of https://github.com/sm64pc/sm64ex with raytracing support.
274 stars 13 forks source link

Various issues when building on Windows #69

Open chronic8000 opened 1 month ago

chronic8000 commented 1 month ago
g++ -std=c++11 -DNDEBUG -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -O2 -I. -c audiofile.cpp
audiofile.cpp:3565:47: warning: 'template<class _Arg, class _Result> struct std::unary_function' is deprecated [-Wdeprecated-declarations]
 3565 |         struct signedToUnsigned : public std::unary_function<SignedType, UnsignedType>
      |                                               ^~~~~~~~~~~~~~
In file included from C:/msys64/mingw64/include/c++/14.1.0/string:49,
                 from audiofile.cpp:1736:
C:/msys64/mingw64/include/c++/14.1.0/bits/stl_function.h:117:12: note: declared here
  117 |     struct unary_function
      |            ^~~~~~~~~~~~~~
audiofile.cpp:3570:47: warning: 'template<class _Arg, class _Result> struct std::unary_function' is deprecated [-Wdeprecated-declarations]
 3570 |         struct unsignedToSigned : public std::unary_function<SignedType, UnsignedType>
      |                                               ^~~~~~~~~~~~~~
C:/msys64/mingw64/include/c++/14.1.0/bits/stl_function.h:117:12: note: declared here
  117 |     struct unary_function
      |            ^~~~~~~~~~~~~~
audiofile.cpp:3763:33: warning: 'template<class _Arg, class _Result> struct std::unary_function' is deprecated [-Wdeprecated-declarations]
 3763 | struct intToFloat : public std::unary_function<Arg, Result>
      |                                 ^~~~~~~~~~~~~~
C:/msys64/mingw64/include/c++/14.1.0/bits/stl_function.h:117:12: note: declared here
  117 |     struct unary_function
      |            ^~~~~~~~~~~~~~
audiofile.cpp:3829:29: warning: 'template<class _Arg, class _Result> struct std::unary_function' is deprecated [-Wdeprecated-declarations]
 3829 | struct lshift : public std::unary_function<Arg, Result>
      |                             ^~~~~~~~~~~~~~
C:/msys64/mingw64/include/c++/14.1.0/bits/stl_function.h:117:12: note: declared here
  117 |     struct unary_function
      |            ^~~~~~~~~~~~~~
audiofile.cpp:3835:29: warning: 'template<class _Arg, class _Result> struct std::unary_function' is deprecated [-Wdeprecated-declarations]
 3835 | struct rshift : public std::unary_function<Arg, Result>
      |                             ^~~~~~~~~~~~~~
C:/msys64/mingw64/include/c++/14.1.0/bits/stl_function.h:117:12: note: declared here
  117 |     struct unary_function
      |            ^~~~~~~~~~~~~~
audiofile.cpp:3931:35: warning: 'template<class _Arg, class _Result> struct std::unary_function' is deprecated [-Wdeprecated-declarations]
 3931 | struct floatToFloat : public std::unary_function<Arg, Result>
      |                                   ^~~~~~~~~~~~~~
C:/msys64/mingw64/include/c++/14.1.0/bits/stl_function.h:117:12: note: declared here
  117 |     struct unary_function
      |            ^~~~~~~~~~~~~~
ar rcs libaudiofile.a audiofile.o
make[2]: Leaving directory '/home/chron/sm64rt/tools/audiofile'
gcc -I../include -I. -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O2 -s  n64graphics_ci_dir/n64graphics_ci.c n64graphics_ci_dir/exoquant/exoquant.c n64graphics_ci_dir/utils.c -o n64graphics_ci -lm
gcc -I../include -I. -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O2 -s -DN64CKSUM_STANDALONE n64cksum.c utils.c -o n64cksum -lm
gcc -I../include -I. -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O2 -s  textconv.c utf8.c hashtable.c -o textconv -lm
gcc -I../include -I. -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O2 -s  patch_libultra_math.c -o patch_libultra_math -lm
patch_libultra_math.c: In function 'main':
patch_libultra_math.c:113:26: warning: overflow in conversion from 'long long unsigned int' to 'long int' changes value from '18446744073709551564' to '-52' [-Woverflow]
  113 |                 fseek(f, -sizeof(hdr), SEEK_CUR);
      |                          ^~~~~~~~~~~~
gcc -I../include -I. -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O2 -s  aiff_extract_codebook.c -o aiff_extract_codebook -lm
gcc -I../include -I. -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O2 -s -Wno-unused-result -Wno-uninitialized -Wno-sign-compare -Wno-absolute-value sdk-tools/adpcm/vadpcm_enc.c sdk-tools/adpcm/vpredictor.c sdk-tools/adpcm/quant.c sdk-tools/adpcm/util.c sdk-tools/adpcm/vencode.c -o vadpcm_enc -lm
gcc -I../include -I. -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O2 -s -Iaudiofile -Wno-uninitialized sdk-tools/tabledesign/codebook.c sdk-tools/tabledesign/estimate.c sdk-tools/tabledesign/print.c sdk-tools/tabledesign/tabledesign.c -o tabledesign -lm -Laudiofile -laudiofile -lstdc++ -lm
gcc -I../include -I. -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O2 -s  extract_data_for_mio.c -o extract_data_for_mio -lm
make[1]: Leaving directory '/home/chron/sm64rt/tools'
cpp -P -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -I . -o build/us_pc/level_rules.mk levels/level_rules.mk
make[1]: Entering directory '/home/chron/sm64rt/tools'
make[1]: Nothing to be done for 'default'.
make[1]: Leaving directory '/home/chron/sm64rt/tools'
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/engine/behavior_script.o src/engine/behavior_script.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/engine/geo_layout.o src/engine/geo_layout.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/engine/graph_node.o src/engine/graph_node.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/engine/graph_node_manager.o src/engine/graph_node_manager.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/engine/level_script.o src/engine/level_script.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/engine/math_util.o src/engine/math_util.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/engine/surface_collision.o src/engine/surface_collision.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/engine/surface_load.o src/engine/surface_load.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/area.o src/game/area.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/behavior_actions.o src/game/behavior_actions.c
tools/textconv charmap_menu.txt include/text_menu_strings.h.in build/us_pc/include/text_menu_strings.h
tools/textconv charmap.txt include/text_options_strings.h.in build/us_pc/include/text_options_strings.h
tools/textconv charmap.txt include/text_strings.h.in build/us_pc/include/text_strings.h
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/camera.o src/game/camera.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/debug.o src/game/debug.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/debug_course.o src/game/debug_course.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/envfx_bubbles.o src/game/envfx_bubbles.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/envfx_snow.o src/game/envfx_snow.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/game_init.o src/game/game_init.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/geo_misc.o src/game/geo_misc.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/hud.o src/game/hud.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/ingame_menu.o src/game/ingame_menu.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/interaction.o src/game/interaction.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/level_geo.o src/game/level_geo.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/level_update.o src/game/level_update.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/macro_special_objects.o src/game/macro_special_objects.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/mario.o src/game/mario.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/mario_actions_airborne.o src/game/mario_actions_airborne.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/mario_actions_automatic.o src/game/mario_actions_automatic.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/mario_actions_cutscene.o src/game/mario_actions_cutscene.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/mario_actions_moving.o src/game/mario_actions_moving.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/mario_actions_object.o src/game/mario_actions_object.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/mario_actions_stationary.o src/game/mario_actions_stationary.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -In file included from src/game/obj_behaviors.c:825:
src/game/behaviors/bowling_ball.inc.c: In function 'bhv_free_bowling_ball_roll_loop':
src/game/behaviors/bowling_ball.inc.c:263:5: warning: 'and' of mutually exclusive equal-tests is always 0
  263 |     if ((collisionFlags & OBJ_COL_FLAG_GROUNDED) && !(collisionFlags & OBJ_COL_FLAGS_LANDED))
      |     ^~
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/obj_behaviors_2.o src/game/obj_behaviors_2.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/object_collision.o src/game/object_collision.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/object_helpers.o src/game/object_helpers.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/object_list_processor.o src/game/object_list_processor.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/options_menu.o src/game/options_menu.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/paintings.o src/game/paintings.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/platform_displacement.o src/game/platform_displacement.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/print.o src/game/print.c
cc -c -O2 -I include -I build/us_pc -I build/us_pc/include -I src -I . -DRAPI_RT64=1 -DWAPI_SDL2=1 -DAAPI_SDL2=1 -DCAPI_SDL2=1 -DHAVE_SDL2=1 `sdl2-config --cflags` -DVERSION_US -D_LANGUAGE_C -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv -DEXT_OPTIONS_MENU -DEXTERNAL_DATA -DFS_BASEDIR="\"res\"" -o build/us_pc/src/game/profiler.o src/game/profiler.c
In file included from include/PR/mbi.h:65,
                 from include/ultra64.h:25,
                 from include/types.h:7,
                 from src/game/area.h:6,
                 from src/game/rendering_graph_node.c:3:
src/game/rendering_graph_node.c: In function 'geo_process_master_list_sub':
include/PR/gbi.h:4518:22: error: assignment to 'uintptr_t' {aka 'long long unsigned int'} from 'GraphNodeGfxInfo *' makes integer from pointer without a cast [-Wint-conversion]
 4518 |         _g->words.w1 = (param);                                         \
      |                      ^
include/PR/gbi.h:4773:33: note: in expansion of macro 'gDPParam'
 4773 | #define gDPNoOpTag(pkt, tag)    gDPParam(pkt, G_NOOP, tag)
      |                                 ^~~~~~~~
src/game/rendering_graph_node.c:170:17: note: in expansion of macro 'gDPNoOpTag'
  170 |                 gDPNoOpTag(gDisplayListHead++, &currList->gfxInfo);
      |                 ^~~~~~~~~~
include/PR/gbi.h:4518:22: error: assignment to 'uintptr_t' {aka 'long long unsigned int'} from 'void *' makes integer from pointer without a cast [-Wint-conversion]
 4518 |         _g->words.w1 = (param);                                         \
      |                      ^
include/PR/gbi.h:4773:33: note: in expansion of macro 'gDPParam'
 4773 | #define gDPNoOpTag(pkt, tag)    gDPParam(pkt, G_NOOP, tag)
      |                                 ^~~~~~~~
src/game/rendering_graph_node.c:179:13: note: in expansion of macro 'gDPNoOpTag'
  179 |             gDPNoOpTag(gDisplayListHead++, NULL);
      |             ^~~~~~~~~~
src/game/rendering_graph_node.c: In function 'obj_is_in_view':
src/game/rendering_graph_node.c:783:9: warning: unused variable 'hScreenEdge' [-Wunused-variable]
  783 |     f32 hScreenEdge;
      |         ^~~~~~~~~~~
src/game/rendering_graph_node.c:782:23: warning: unused variable 'geo' [-Wunused-variable]
  782 |     struct GraphNode *geo;
      |                       ^~~
src/game/rendering_graph_node.c:781:9: warning: unused variable 'halfFov' [-Wunused-variable]
  781 |     s16 halfFov; // half of the fov in in-game angle units instead of degrees
      |         ^~~~~~~
src/game/rendering_graph_node.c:780:9: warning: unused variable 'cullingRadius' [-Wunused-variable]
  780 |     s16 cullingRadius;
      |         ^~~~~~~~~~~~~
src/game/rendering_graph_node.c:779:62: warning: unused parameter 'matrix' [-Wunused-parameter]
  779 | static int obj_is_in_view(struct GraphNodeObject *node, Mat4 matrix) {
      |                                                         ~~~~~^~~~~~
make: *** [Makefile:997: build/us_pc/src/game/rendering_graph_node.o] Error 1

I get all these errors when building with "make RENDER_API=RT64 EXTERNAL_DATA=1" on MINGW64 on Windows 11

chronic8000 commented 1 month ago

If I ask ChatGPT about the errors it says this:

Your current compilation output indicates that several warnings are being generated, primarily due to the use of deprecated features and overflow issues. Here’s how you can address these issues:

Deprecated std::unary_function Warnings: Replace std::unary_function with the appropriate standard function or lambda expression. Since C++11, std::unary_function has been deprecated and it is recommended to use std::function instead. Here’s how you can make the changes:

Before:

cpp

struct signedToUnsigned : public std::unary_function<SignedType, UnsignedType> {
    // your code
};

After:

cpp

struct signedToUnsigned {
    UnsignedType operator()(SignedType x) const {
        // your code
    }
};

Repeat this change for all instances of std::unary_function.

Overflow Warning in patch_libultra_math.c: This warning is due to a conversion issue where an unsigned long long is being converted to a long. You can resolve this by changing the type of sizeof(hdr) to a signed type explicitly.

Before:

c

fseek(f, -sizeof(hdr), SEEK_CUR); After:

c Copy code fseek(f, -(long)sizeof(hdr), SEEK_CUR); By making these changes, you should be able to eliminate the specific warnings you're encountering. Here is an example of what one of these changes would look like in the context of your code:

Example Change in audiofile.cpp: Before:

cpp

struct signedToUnsigned : public std::unary_function<SignedType, UnsignedType> {
    UnsignedType operator()(SignedType x) const {
        // conversion logic
    }
};

After:

cpp

struct signedToUnsigned {
    UnsignedType operator()(SignedType x) const {
        // conversion logic
    }
};

Example Change in patch_libultra_math.c: Before:

c Copy code fseek(f, -sizeof(hdr), SEEK_CUR); After:

c

fseek(f, -(long)sizeof(hdr), SEEK_CUR); By making these adjustments, your code should compile without these specific warnings.

chronic8000 commented 1 month ago

Open the include/PR/gbi.h file.

Find the gDPParam macro and modify it to cast the param to uintptr_t.

Change this:

#define gDPParam(pkt, cmd, param)                    \
{                                    \
    Gfx *_g = (Gfx *)(pkt);                     \
                                    \
    _g->words.w0 = _SHIFTL(cmd, 24, 8);               \
    _g->words.w1 = (param);                     \
}

To this:

#define gDPParam(pkt, cmd, param)                    \
{                                    \
    Gfx *_g = (Gfx *)(pkt);                     \
                                    \
    _g->words.w0 = _SHIFTL(cmd, 24, 8);               \
    _g->words.w1 = (uintptr_t)(param);                     \
}

Find the gDPNoOpTag macro and modify it to cast the tag to uintptr_t. Change this:

#define gDPNoOpTag(pkt, tag) gDPParam(pkt, G_NOOP, tag) To this:

#define gDPNoOpTag(pkt, tag) gDPParam(pkt, G_NOOP, (uintptr_t)(tag)) After making these changes, save the file and run make again. This should resolve the compilation errors you encountered.

Here is the updated section of gbi.h for clarity:

#define gDPParam(pkt, cmd, param)                    \
{                                    \
    Gfx *_g = (Gfx *)(pkt);                     \
                                    \
    _g->words.w0 = _SHIFTL(cmd, 24, 8);               \
    _g->words.w1 = (uintptr_t)(param);                     \
}

#define gDPNoOpTag(pkt, tag)    gDPParam(pkt, G_NOOP, (uintptr_t)(tag))

Making this change seemed to fix it.

chronic8000 commented 1 month ago

Yup, making that last change worked. It compiled and ran with no issue.