#62875 - highPSIb18 - Tue Dec 06, 2005 5:42 pm
I am a total newb to using the Advance Gameboy development Kit. I have basic knowledge in c++/javascript/html. Unfortunately I can't the hello.c to work with the development kit. I create the hello.c, make.bat and when I run the batch file it gives me linking errors. I have spent a couple hours now trying to get it to work. I followed the instructions on setting up the compiler and still to no dice. Here is the link to the tutorial that I used:
http://www.loirak.com/gameboy/gbatutor.php
Here is the specific error code in the command line I am getting.
"'gcc' is not recognized as a internal or external command, operable program or batch file"
Any ideas as to how to get this super basic program to compile and link?? I know it is something very basic and I am used to the pre packaged programs. Help a newb become a more informed newb. Thanks in advance!
#62879 - highPSIb18 - Tue Dec 06, 2005 6:02 pm
anyone??
#62881 - poslundc - Tue Dec 06, 2005 6:22 pm
I'm neither a Windows expert nor a toolchain expert, but it sounds like you haven't set up the paths in your environment variables correctly. Go through the instructions again and make sure you've correctly followed any steps that deal with adding the GCC directories to your path.
Dan.
#62891 - highPSIb18 - Tue Dec 06, 2005 7:32 pm
OK,
I went through the tutorial again. Still same thing. This time I took it upon myself to create a different folder structure for the prgram:
c:\devkitadv\
\bin
\lib
\gcc
c:\prog\
\hello
I just set one environment variable:
path=c:\devkitadv\bin
I unzipped each file into it's assumed folder:
agb-win-binutils-r5-beta-3 => c:\devkitadv\bin\
agb-win-core-r5-beta-3 => c:\devkitadv\
agb-win-gcc-r5-beta-3 => c:\devkitadv\gcc\
agb-win-newlib-r5-beta-3 => c:\devkitadv\lib\
am I just supposed to unzip them all to the folder c:\devkitadv\ ?????? I assumed since you are setting that path(above) that you would need to create the folder structure along with it. My OS is Windoze2000 sp4.
* :( <--- (me pulling my hair out)
#62899 - ScottLininger - Tue Dec 06, 2005 8:32 pm
What hello world code are you trying to compile? Are you using a makefile or a simple batch file?
If it's a batch file, there might be some assumption in the gcc call about the path? Maybe you could post the makefile and/or bat file so we can see if there are any problems there.
-Scott
#62901 - thegamefreak0134 - Tue Dec 06, 2005 8:52 pm
You set the environment variable in your make file right? I recommend putting a pause after that set so you can see if the path statement is returning any errors. (too many parameters or the like.) If it is, there's your problem. The variable isn't getting set. (Sadly, happens a lot on old 98/95 machines.)
If it's not, make sure you are pointing to the right folder as mentioned above. You might try just copying the gcc.exe file from the bin folder directly into your make folder. This usually works. Unfortunately, when working with larger projects and many different programs it becomes quite cluttered...
_________________
What if the hokey-pokey really is what it's all about?
[url=http:/www.darknovagames.com/index.php?action=recruit&clanid=1]Support Zeta on DarkNova![/url]
#62904 - highPSIb18 - Tue Dec 06, 2005 9:17 pm
make.bat
set path=C:\devkitadv\bin;%path%
gcc -o hello.elf hello.c -lm
objcopy -O binary hello.elf hello.gba
pause
startup.bat
set PATH=c:\devkitadv\bin;c:\devkitadv\gcc;c:\devkitadv%PATH%
cmd
]-this is what i use to start the command line, then I go into the prog folder, c:\devkitadv\prog\hello\ and run the make file. Then I get the linking errors
should I install the patch for windows 95/98 even though I am running windows 2000?
#62980 - Crs - Wed Dec 07, 2005 1:58 pm
Hi
Quote: |
"'gcc' is not recognized as a internal or external command, operable program or batch file" |
This isn't actually a linking error, it means it can not find the executable. If your paths seem correct you can check to see if GCC.EXE is in the 'C:\devkitadv\bin' folder? I think this is the problem.
if it is a path problem check there are no spaces lurking in your directory structure (at the start and the end of each folder)
Let us know how you get on.
Chris.
#62982 - Cearn - Wed Dec 07, 2005 2:34 pm
Devkitadv and loirak are both pretty much ancient history by now, you might want to use some more recent stuff like devkitpro and tonc. See the faq for more.
#62984 - thegamefreak0134 - Wed Dec 07, 2005 2:50 pm
You use this:
set path=C:\devkitadv\bin;%path%
in your makefile, and I think (although unsure) that it needs to either be this:
set path=C:\devkitadv\bin;%PATH%
or this:
set path="C:\devkitadv\bin;"%path%
or both:
set path="C:\devkitadv\bin;"%PATH%
to get it to work right.
_________________
What if the hokey-pokey really is what it's all about?
[url=http:/www.darknovagames.com/index.php?action=recruit&clanid=1]Support Zeta on DarkNova![/url]
#63037 - highPSIb18 - Thu Dec 08, 2005 1:14 am
OK, followed your advice and got the devkitPro to work. Thank's for the redirection! Now I can focus on the fun stuff. Thanks