Fix 2015/endoh3 for linux

There was a problem with duplicate symbols of main but using the option
-fcommon in the compiler flags solves this problem. It was not an issue
with macOS as the default behaviour (I guess default anyway).

With this commit I believe that all entries (except for two that are not
supposed to compile) compile in linux. They haven't all been tested but
all but two should compile in linux if one has the appropriate libraries
for those that use other libraries.
This commit is contained in:
Cody Boone Ferguson committed 2023-07-06 11:42:50 -07:00
1 parent b198d4e5a4
commit fa1f35a7d6
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -57,7 +57,7 @@ ARCH=
# Defines that are needed to compile
#
CDEFINE=
CDEFINE= -fcommon
# Include files that are needed to compile
#
+4
View File
@@ -1323,6 +1323,10 @@ were linking errors.
## [2015/endoh3](2015/endoh3/prog.c) ([README.md](2015/endoh3/README.md]))
Cody fixed this to compile with linux which was having a problem with duplicate
symbols of `main()`. The fix is through the option `-fcommon` which will let it
compile like it does with macOS.
The author, Yusuke, supplied the additional source files, which Cody added to
the repo for us. Yusuke wrote in his [analysis of the
entry](https://mame-github-io.translate.goog/ioccc-ja-spoilers/2015/endoh3.html?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp)