StewBC / manicminer

Manic Miner clone for Commodore 64 & cc65
27 stars 10 forks source link

Unable to make project #1

Closed erasmusa closed 7 years ago

erasmusa commented 7 years ago

Following the instructions in the README. I'm using Windows and I think I have all the correct software installed.

$ which make /c/Program Files (x86)/GnuWin32/bin/make $ cl65 --version cl65.exe V2.15 $ echo $CC65_HOME C:\C64\Tools\cc65

The Makefile version. ###############################################################################

Generic Makefile for cc65 projects - full version with abstract options

V1.3.0(w) 2010 - 2013 Oliver Schmidt & Patryk "Silver Dream !" Łogiewa

###############################################################################

If I go into the project directory and I run make I get this...

$ make C:\C64\Tools\cc65/bin/cl65 -t c64 -c --create-dep obj/c64/game.d -o obj/c64/game.o src/game.c src/game.c(16): Error: Conflicting types for main' src/game.c(25): Error: Conflicting types formainLoop' src/game.c(199): Error: Conflicting types for setup' src/game.c(210): Error: Conflicting types forprepLevel' src/game.c(253): Error: Conflicting types for runGame' src/game.c(349): Error: Conflicting types forbuildPowerBeamPath' src/game.c(612): Error: Conflicting types for moveSprites' src/game.c(641): Error: Conflicting types formoveWilly' make: *** [obj/c64/game.o] Error 1

Please note that I'm not a seasoned C developer and this is an attempt to learn more about C on other platforms such as the C64 architecture. I can code in MOS 6502 assembler and Zilog Z80.

On the Z80 processors I used z88dk which used the zcc frontend and the z80asm assembler, more recently allowed the use of SDCC as an alternative Z80 assembler which produces better assembly with less overhead.

I don't recall getting stuck this bad back then.

StewBC commented 7 years ago

Hi Adriaan,

There are a few issues. The compiler has change substantially since I wrote this code. The specific error you are seeing is that I have things like main in the header (.h) and in the implementation (.cpp) and they aren't seen as the same by the compiler in the current version. To fix this specific error, there are 2 things you can do: 1) make all of the functions ending in (); in the header file end in (void); For example void setup(); would become void setup(void); 2) Add -Wc --all-cdecl to CFLAGS in the makefile or use this command line: cl65 -Oi -Wc --all-cdecl src/globals.c src/data.c src/render.c src/game.c -o manicminer.c64 -C src/manic64.cfg

Unfortunately, that will not be the end of the problems. I used a custom config file (src/manic64.cfg). The contents of that is now way out of date with the current compiler. I tried quickly to see if I could make it go but I couldn't and unfortunately I don't have time to keep at it right now.

If you really want to compile this, you would need an old build of the compiler. Sorry I cannot be of more help right now.

All the best, Stefan

StewBC commented 7 years ago

Hi Again,

I updated the header files and modified the .cfg file and it compiled and seems to work fine.

Thanks Stefan

erasmusa commented 7 years ago

Hi Stefan,

This is great news!

Thanks, Adriaan