Open
Conversation
…rings g++ /* ... */ -O2 -Wall -DNDEBUG;-Wno-implicit-function-declaration -Wno-incompatible-pointer-types /* ... */ -o CMakeFiles/sdlnp2kai_sdl2.dir/sound/fmgen/fmgen_file.cpp.o -c /build/source/sound/fmgen/fmgen_file.cpp ld: <glibc>/lib/Scrt1.o: in function `_start': (.text+0x1b): undefined reference to `main' collect2: error: ld returned 1 exit status bash: line 1: -Wno-implicit-function-declaration: command not found
/build/source/sdl/fontmng.c:503:58: error: passing argument 2 of 'TTF_GlyphMetrics' makes integer from pointer without a cast [-Wint-conversion]
In file included from /build/source/sdl/fontmng.c:20:
<SDL2_ttf>/include/SDL2/SDL_ttf.h:800:69: note: expected 'Uint16' {aka 'short unsigned int'} but argument is of type 'SDL_Surface *'
/build/source/sdl/np2.c:373:19: error: passing argument 2 of 'fgets' makes integer from pointer without a cast [-Wint-conversion] /build/source/sdl/np2.c:373:25: error: passing argument 3 of 'fgets' makes pointer from integer without a cast [-Wint-conversion]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are further issues, but the fixes are less straight-forward (or I think the "easy" fixes are really bad). Hint:
COMMON_C_CXX_FLAGSare not actually applied to C code, just C++ code.CMAKE_CXX_FLAGS_DEBUGandCMAKE_CXX_FLAGS_RELEASEare currently a list of strings, due to how the quoting is done. This leads to a build failure whenever a C++ file gets compiled, due to the CMake list separator;being interpreted as the end of the command.The calls to
TTF_GlyphMetrics(TTF_GetGlyphMetricsin SDL3) pass a pointer to anSDL_Surfacewhere a 16-bit character code is expected. Likely a typo caused by super-short variable names,sinstead ofc.The
fgetscall in/sdl/np2.chas the wrong parameter order - output location & length instead of length & location location.