Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

#1 2013-05-25 18:14:35

TripKipz
New member
Registered: 2013-05-18
Posts: 2

GBDK can't Compile, Help!

######################################################
Sorry i found what i did wrong

in cmd.exe i typed

c:\gbdk\bin\lcc -o c:\gbdk\hello.gb c:\gbdk\hello.c

this sample code is from  http://www.loirak.com/gameboy/gbprog.php

#include <gb/gb.h>
#include <stdio.h>

void main()
{
        printf("Welcome to GAMEBOY\nProgramming");
        printf("\nPress Start");
        waitpad(J_START);  // other keys are J_A, J_UP, J_SELECT, etc.
        printf("\nIsn't it easy!");
}

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

I downloaded GBDK 2.94 from sourceforge.net. Unziped it to c:\gbdk\. Copied and pasted this

#include <stdio.h>
#include <gb\gb.h>

void main()
{
printf(“Hello World!”);
}

wrote the following in cmd.exe

c:\gbdk\bin\lcc -o c:\gbdk\hello.gb hello.c

comes up with this on terminal "c:\gbdk\bin\lcc: can't find hello.c"
but that wierd because if i do this

c:\gbdk\hello.c, hello.c opens up in Dev-C++ which i installed.

then i tried it with this

c:\gb\gbdk\bin\lcc -o c:\gb\gbdk\helloworld.c hello.gb

and said on terminal "c:\gb\gbdk\bin\lcc -o: whould overwrite c:\gbdk\hello.c"
how do i say yes to overwrite it?

i dont know what im doing wrong. Anyone know what i'm doing wrong?

thanks

Last edited by TripKipz (2013-05-26 09:59:22)

Offline

 

#2 2013-05-26 17:34:55

paulc
Member
Registered: 2012-10-23
Posts: 27

Re: GBDK can't Compile, Help!

I think all you need is this:

lcc  -o hello.gb hello.c

so navigate to:  c:\gb\gbdk\bin\    then use the above command
Make sure your hello.c file is in the "bin" folder

Offline

 

#3 2013-05-27 23:06:13

TripKipz
New member
Registered: 2013-05-18
Posts: 2

Re: GBDK can't Compile, Help!

thanks smile

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson