Add note about time.h in 2013/cable3
Interestingly the problem with localtime() being redefined is only for (at least with the current implementation of SDL in macOS) SDL2 which as I noted cannot be used anyway. Nevertheless I have kept the fix in case some system SDL1 SDL.h file ends up including time.h.
This commit is contained in:
1 parent
99768d592a
commit
eecce31dac
1 file changed
+9
-5
@@ -16,11 +16,15 @@ make
|
||||
```
|
||||
|
||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to compile
|
||||
with modern systems. The problem is that `localtime()` is used differently and
|
||||
`time.h` being included there was a conflicting function type. This appeared to
|
||||
be a problem with macOS. The other problem is that this entry uses SDL functions
|
||||
that were removed from SDL2 so the Makefile has to use `sdl-config` and not
|
||||
`sdl2-config`. Thank you Cody for your assistance!
|
||||
with modern systems. The problems were that `localtime()` is used differently
|
||||
and `time.h` being included (with SDL2 in macOS - but see below) there was a
|
||||
conflicting function type. This appeared to be a problem with macOS and only
|
||||
when SDL2 was included (but which as noted next it cannot be). The other problem
|
||||
is that this entry uses SDL functions that were removed from SDL2 so the
|
||||
Makefile has to use `sdl-config` and not `sdl2-config`. Thus the removal of
|
||||
localtime probably does not have to be done after all. He left it there in case
|
||||
some implementation of SDL1 also has this problem. Thank you Cody for your
|
||||
assistance!
|
||||
|
||||
|
||||
### Try:
|
||||
|
||||
Reference in new issue
Block a user