WillSams / Making-Games-For-The-NES-book-examples

Me just going through Steven Hugg's book, sans the need to use the 8bitworkshop web IDE.
8 stars 4 forks source link

make error 1 on some folders #1

Closed DoctorMikeReddy closed 7 months ago

DoctorMikeReddy commented 8 months ago

Error: ./../neslib/neslib.h:300: Error: Macro redefinition is not identical 1 errors and 0 warnings generated. make: *** Error 1 for the following folders: 02 .. 11 13 .. 22 So, only two projects working :-(

DoctorMikeReddy commented 7 months ago

Temp fix is to comment out line 300 as it is the NULL definition in neslib.h

DoctorMikeReddy commented 7 months ago

Ok, have found a duplicate NULL define here in the latest version of cc65:

https://github.com/cc65/cc65/blob/master/include/stddef.h

/ NULL pointer /

ifndef NULL

define NULL ((void *) 0)

endif

So, I'm guessing this must be happening first in the cases where the code doesn't compile, before the NULL definition in your version of neslib.h tries

WillSams commented 7 months ago

Sorry I missed this. Thanks, @DoctorMikeReddy !

DoctorMikeReddy commented 7 months ago

So, I comment out line 300 and there is no conflict. I have updated with compile.bat to work with VSCode the repo here:

https://github.com/PlaceholderGames/NESTools/tree/main/NESHugg

(There are a collection of NES repos here, with me adding VSCode compatibility for my students. If you want access, I can add you as a collaborator)

However, a couple of chapters are _BROKE as I can get them to compile but they then don't run; assuming there's something missing/wrong with my compilation, but your make files don't work either in a vanilla copy. These are specifically no 16 and 18. Any ideas?

WillSams commented 7 months ago

I'll take a look tonight