• Feeling isolated? You're not alone.

    Join 20,000+ people who understand exactly how your day went. Whether you're newly diagnosed, self-identified, or supporting someone you love – this is a space where you don't have to explain yourself.

    Join the Conversation → It's free, anonymous, and supportive.

    As a member, you'll get:

    • A community that actually gets it – no judgment, no explanations needed
    • Private forums for sensitive topics (hidden from search engines)
    • Real-time chat with others who share your experiences
    • Your own blog to document your journey

    You've found your people. Create your free account

I don't understand this make error :/

GoofKing

All your bases are belong to us
I did everything this site on setting up gbdk (Gameboy development Kit) on Linux and it all went smoothly until I got to the make-file part.

Here's what it contains:

Code:
CC    = ../../../bin/lcc -Wa-l -Wl-m

BINS    = test01.gb

all:    $(BINS)

%.o:    %.c
    $(CC) -c -o $@ $<

%.s:    %.c
    $(CC) -S -o $@ $<

%.o:    %.s
    $(CC) -c -o $@ $<

%.gb:    %.o
    $(CC) -o $@ $<

clean:
    rm -f *.o *.lst *.map *.gb

# Link file, and write 0x80 at position 0x143 in header
test01.gb:    test01.o
    $(CC) -Wl-yp0x143=0x80 -o test01.gb test01.o

but when I type make it gives this error:

Code:
makefile:8: *** missing separator (did you mean TAB instead of 8 spaces?).  Stop.

...

At first I had trouble with the site and deciding rather or not there were spaces in the make-file but then had the common sense to just copy it completely from the site here,MariusGames - Making Gameboy games: installing the GBDK compiler in Ubuntu Linux

and it's still giving me errors. Why the hell does it matter if an effing tab instead of eight spaces and why does it even matter in the first place ?

What does it even mean ?
 
As you've found out, makefiles are weird and fussy.
They need tabs, and you can't substitute spaces for them.

And why are make files fussy like this ? It just seems unnecessary :/ I opened the file with Gedit and replaced the spaces with tabs by backspacing everything and tabbing them instead, now I got this error:

Code:
../../../bin/lcc-Wa-l-Wl-m -c -o test01.o test01.c
make: ../../../bin/lcc-Wa-l-Wl-m: Command not found
makefile:8: recipe for target 'test01.o' failed
make: *** [test01.o] Error 127

and wonder what I've done to piss of the almighty Linux make command :/
 
And you are dealing with very old libraries and the old CC compiler.
I had a look... gdbk stopped updating in 2001.

Sounds like a fun little adventure anyway. I hope you succeed in making something.
 
And you are dealing with very old libraries and the old CC compiler.
I had a look... gdbk stopped updating in 2001.

Sounds like a fun little adventure anyway. I hope you succeed in making something.

Well, if I've given up on Linux, I'd be with the Unix haters and with the author of the Unix haters guide :P I must admit that learning from Linux is rewarding if you could swallow the frustrations and keep trying. Believe me, I've been to the point of giving up but still had stuck with Debian :D
 
And why are make files fussy like this ? It just seems unnecessary :/ I opened the file with Gedit and replaced the spaces with tabs by backspacing everything and tabbing them instead, now I got this error:

Code:
../../../bin/lcc-Wa-l-Wl-m -c -o test01.o test01.c
make: ../../../bin/lcc-Wa-l-Wl-m: Command not found
makefile:8: recipe for target 'test01.o' failed
make: *** [test01.o] Error 127
and wonder what I've done to piss of the almighty Linux make command :/


Woah, don't replace ALL spaces with Tabs. Just do the indenting with them.
"lcc-Wa-l-Wl-m: Command not found" <--- remove the tabs and put in spaces.
Alternatively, do you have "lcc" installed on your machine?
 
Hmmm... where did you get the library? I saw that lcc is part of the whole package. I have no idea how you install it.
 

New Threads

Top Bottom