gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > make.bat errors! HELP

#34322 - stuleelight - Mon Jan 17, 2005 9:34 pm

I have recently walked through a couple of tutorials for compiling and making elf's...but have the same problem each time. The common message is "...not internal or external command" or "no such file exists". I made a C:/devkit PATH, but now what?!?
_________________
^o^

#34329 - yaustar - Tue Jan 18, 2005 1:02 am

what does your make.bat have in it (post here) and whether you use Devkitarm or Devkitadv
_________________
[Blog] [Portfolio]

#34336 - stuleelight - Tue Jan 18, 2005 4:55 am

The tutorial from which this situation arises can be found at http://www.loirak.com/gameboy/gbatutor.php
.
The make.bat is

set path=C:\devkitadv\bin;%path%
gcc -o hello.elf hello.c -lm
objcopy -O binary hello.elf hello.gba
pause

. I redid it again,

...gcc -o hello.elf hello.c -lm
'gcc' is not recognized as an internal or external command,
operaable program or batch file.

...objcopy -) binary hello.elf hello.gba
objcopy: hello.elf: No such file or directory

...pause

and no elf for VisualBoy Advance in my Devkit directory. Does that clarify anything?
Appreciatively,
stuleelight[/url]
_________________
^o^

#34393 - Abscissa - Tue Jan 18, 2005 11:37 pm

You did install DevKitAdv, didn't you? And you installed it to C:\devkitadv?

#34443 - stuleelight - Wed Jan 19, 2005 7:15 pm

I sure did install Devkit and put it in C:/Devkit. Followed the tutorial and put what was needed in the PATH as well.
_________________
^o^

#34447 - Fatnickc - Wed Jan 19, 2005 7:41 pm

Aren't you getting devkitadv from C:\devkitadv in you make file, when you just said you put it in C:\devkit?

Last edited by Fatnickc on Thu Jan 20, 2005 12:21 pm; edited 1 time in total

#34481 - stuleelight - Thu Jan 20, 2005 4:28 am

sry, was being 2 short. The correction is devkitadv. you are correct.
_________________
^o^

#34492 - Fatnickc - Thu Jan 20, 2005 12:20 pm

So, does it work now? Or did you mean you were just telling it to us short?

#34500 - stuleelight - Thu Jan 20, 2005 4:00 pm

I meant my first post was a typo, and no....it doesn't work.
_________________
^o^

#34507 - Fatnickc - Thu Jan 20, 2005 5:59 pm

OK, let's start again. Call this 'make.bat' -

Code:

path=C:\devkitadv\bin
gcc -o hello.elf hello.c -lm
objcopy -O binary hello.elf hello.gba

Now, save that in the directory that has got 'hello.c' in. Open up the command prompt. Then, if, say, the place that your game (well, hello.c) is stored in is called 'C:\devkitadv\hello', type in to the command prompt this :
Code:

CD \devkitadv\hello

and press return/enter.
Then, type in
Code:
make

(press return/enter)
and, if it works, it should have no errors, and work nicely.
Tell me if it doesn't work.

#34555 - stuleelight - Fri Jan 21, 2005 8:46 am

=(---
I did that and couldn't get the make.bat to do anything. Tried out of just the command prompt and said that hello was not an operable internal or external command.
stuleelight
_________________
^o^

#34572 - Fatnickc - Fri Jan 21, 2005 8:10 pm

No, no, no. After typing
Code:
CD \devkitadv\hello

type 'make', and make sure that the 'make.bat' file in my previous post is in C:\devkitadv\hello.

#34587 - stuleelight - Sat Jan 22, 2005 12:22 am

I did all that and it still had an error.
"gcc not recognized as internal external..."
"hello.elf not recognized..."
=(---
_________________
^o^

#34600 - yaustar - Sat Jan 22, 2005 2:21 am

try this tutorial instead...
http://www.webbesen.dk/gba/
_________________
[Blog] [Portfolio]

#34760 - stuleelight - Tue Jan 25, 2005 7:40 pm

First, thank you nic and yau for the help! I have went through both of these, to the T, and have this screen every time I reach the make.bat execution.
[qoute]
C:\devkitadv\pong>path=C:\devkitadv\bin

C:\devkitadv\pong>gcc -o pong.elf pong.c -lm
'gcc' is not recognized as an internal or external command,
operable program or batch file.

C:\devkitadv\pong>objcopy -0 binary opng.elf opng.bin
objcopy: pong.elf: No such file or directory

[/quote][/quote]
_________________
^o^

#34761 - Fatnickc - Tue Jan 25, 2005 8:19 pm

Hmmm.. What I'm going to suggest now may seem drastic, but i reckon it'll work!
Delete your current instalation of DevkitAdv, and download the one from the link in webbesen.dk/gba. It is pre put-together, so none of that trouble with getting everything in the right place. Then, follow the tutorial. See if it works for you then. Remember - drastic times call for drastic measures!

#34770 - yaustar - Tue Jan 25, 2005 10:41 pm

This what my make.bat file looks like using devkitADV
Code:
path=c:\DevkitAdv\bin
gcc -g -o rom\main.elf main.cpp bg.cpp -lm
objcopy -O binary rom\main.elf rom\main.gba

pause

This is put inthe same directory as the code and all I do is double click it...
_________________
[Blog] [Portfolio]

#34814 - Fatnickc - Wed Jan 26, 2005 5:56 pm

Double clicking it just does the same thing as typing 'make' in the command line, but then you have to search around for it, and when I have a folder ofr a game, it gets fairly full up.
But, each to their own.

#34890 - stuleelight - Thu Jan 27, 2005 11:27 pm

Thanks again for all the HELP! Now I have this error appear, after I have reinstalled DevKitAdv and went through the tutorial;

C:\devkitadv\pong>gcc -o pong.elf pong.c \lm
pong.c:2:16: bg.h: No such file or directory
pong.c: In function 'main':
pong.c:11: 'bgPalette' undeclared <first use in this function>
pong.c:11: <Each undeclared identifier is reported in this function>
pong.c:11: for each function it appears in.>
pong.c:15: 'bgData' undeclared <first use in this function>

C:\devkitadv\pong>objcopy -0 binary pong.elf pong.bin
_________________
^o^

#34907 - yaustar - Fri Jan 28, 2005 4:25 am

you dont have bg.h in the same directory as the rest of your files.
_________________
[Blog] [Portfolio]

#34955 - Fatnickc - Fri Jan 28, 2005 6:13 pm

Yep, as Yaustar said, you don't have 'bg.h' in C:\devkitadv\pong. Or, you haven't written
Code:
#include "bg.h"

at the top of your file with the other includes (like gba.h).
You might have downloaded the image from the tutorial, instead of being creative. if you did, you need to run it through 'pcx2gba' (not pcx2sprites, this is a background ;) ). The tutorial tells you how to do this. Thne, if you followed the tutorial perfectly, it told you to do all that conversion in a folder called 'tools' if you did that, copy bg.h to C:\devkitadv\pong, and add a blank line to the end.
Then it should work.

#34967 - stuleelight - Fri Jan 28, 2005 7:38 pm

Hey! I am 2 creative! =)
_________________
^o^

#34974 - Fatnickc - Fri Jan 28, 2005 8:32 pm

Sorry ^_^ - but, try that out, and tell us if it works.

#34992 - stuleelight - Sat Jan 29, 2005 2:26 am

JK...and yes, SUCCESS! I finally am creating something. Much thanks needed to Yau and Nic!
_________________
^o^

#35018 - Fatnickc - Sat Jan 29, 2005 1:36 pm

Glad it finally worked out for you. I remember it took me a long time to get my first games going.

#35022 - kareemjg - Sat Jan 29, 2005 2:41 pm

This may not help much.. but are you running your batch command via MSDOS or are you having it called up in some sort of windows IDE. Try this.. go to msdos.. run your batch file and then type gcc. It should recoginize the command and say something about adding the file.

If it does then then we know you pathing is right and it is see the directory where you have your complier software in. Now if you are running a Windows IDE you want to right click on MY COMPUTER then click on PROPERTIES and then click on ADVANCE. You want to look at the both to set you Environmental Variables. Click that and add you pathing onto the PATH= statement that you should see.

If this doesnt fix the problem hit me on IM MSN and I'll try and help you out. Add me as a contact via this addy kareem<dot>glover<at>khova.com.

-kareemjg

#35024 - kareemjg - Sat Jan 29, 2005 2:45 pm

stuleelight wrote:
JK...and yes, SUCCESS! I finally am creating something. Much thanks needed to Yau and Nic!


Hehe.. I'm not sure why I didn't see this before I posted. Guess I was just so anxious to finally be able to help somebody else out. Either way glad you got it up and working. Now lose my address.! :)

-kareem

#35061 - stuleelight - Sat Jan 29, 2005 11:27 pm

kareemjg,
I am sure I will need help sooner or later...I did just start.
stuleelight
_________________
^o^