Fix 2000/thadgavin for SDL + format README.md
The SDL version did not work for a number of reasons. First of all the
code requires that SDL is defined. Second the path wrong header file was
included. Third the SDL1 developers thought it would be a great idea
(but obviously it's a terrible idea) to redefine main() (!!) so that any
program that uses SDL1 has to have the same args as their definition.
This program had 'main()' so the error message was:
thadgavin.c:60:1: error: conflicting types for 'SDL_main'
main()
^
/opt/local/include/SDL/SDL_main.h:34:14: note: expanded from macro 'main'
#define main SDL_main
^
/opt/local/include/SDL/SDL_main.h:35:12: note: previous declaration is here
extern int SDL_main(int argc, char *argv[]);
^
1 warning and 1 error generated.
make: *** [thadgavin_sdl] Error 1
Thus main() was changed to 'int main(int argc, char **argv)'. I am not
sure if I want to know their thinking. I kind of do but I also don't.
Format fix README.md.
This commit is contained in:
1 parent
43d4057682
commit
dd0b26b5d6
3 files changed
+67
-34
No files matched your search
@@ -129,8 +129,12 @@ all: data ${TARGET}
|
||||
supernova deep_magic magic charon pluto
|
||||
|
||||
${PROG}: ${PROG}.c
|
||||
@echo "WARNING: if you are sensitive to rapid movement you should probably avoid this entry."
|
||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||
|
||||
${PROG}_sdl: ${PROG}.c
|
||||
${CC} ${CFLAGS} -DSDL `${SDL1_CONFIG} --cflags` $< -o $@ ${LIBS} `${SDL1_CONFIG} --libs`
|
||||
|
||||
# alternative executable
|
||||
#
|
||||
alt: data ${ALT_TARGET}
|
||||
|
||||
Reference in new issue
Block a user