#14197 - dev_vectormatrix - Thu Jan 01, 2004 6:46 pm
getting an error when trying to compile a simple "Hello World!" style program (http://www.loirak.com/gameboy/gbatutor.html)... i can't see why this error is occuring, let alone fix it... i'm not familiar with this compiler but i do have some previous programming experience in c++ and others and i can see nothing faulty in the code itself...
DEBUG OUTPUT AT COMPILE TIME:
C:\prog\Hello>set PATH=c:\devkitadv\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOW
S\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;c:\hla;c:\hl
a\radasm;c:\hla\radasm\addins;C:\devkitadv\bin ;C:\Program Files\Microsoft Visua
l Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDe
v98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\M
icrosoft Visual Studio\VC98\bin
C:\prog\Hello>set GCC_EXEC_PREFIX=c:/devkitadv/lib/gcc-lib/
C:\prog\Hello>gcc -o hello.elf hello.c -lm
gcc: installation problem, cannot exec `as': No such file or directory
C:\prog\Hello>objcopy -O binary hello.elf hello.gba
'objcopy' is not recognized as an internal or external command,
operable program or batch file.
C:\prog\Hello>pause
Press any key to continue . . .
--------------------------------------------------------------------------------
BATCH FILE USED TO COMPILE:
set PATH=c:\devkitadv\bin;%PATH%
set GCC_EXEC_PREFIX=c:/devkitadv/lib/gcc-lib/
gcc -o hello.elf hello.c -lm
objcopy -O binary hello.elf hello.gba
pause
--------------------------------------------------------------------------------
SOURCE:
/* hello.c - Gameboy Advance Tutorial - Loirak Development */
#define RGB16(r,g,b) ((r)+(g<<5)+(b<<10))
int main()
{
char x,y;
unsigned short* Screen = (unsigned short*)0x6000000;
*(unsigned long*)0x4000000 = 0x403; // mode3, bg2 on
// clear screen, and draw a blue back ground
for(x = 0; x<240;x++) //loop through all x
{
for(y = 0; y<160; y++) //loop through all y
{
Screen[x+y*240] = RGB16(0,0,31);
}
}
// draw a white HI on the background
for(x = 20; x<=60; x+=15)
for(y = 30; y<50; y++)
Screen[x+y*240] = RGB16(31,31,31);
for (x = 20; x < 35; x++)
Screen[x+40*240] = RGB16(31,31,31);
while(1){} //loop forever
}
--------------------------------------------------------------------------------
running xp pro, with an old demo version of ms visual c++ 6...
the compiler is installed in C:\devkitadv\ and the source file and .bat are in C:\prog\hello\
DEBUG OUTPUT AT COMPILE TIME:
C:\prog\Hello>set PATH=c:\devkitadv\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOW
S\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;c:\hla;c:\hl
a\radasm;c:\hla\radasm\addins;C:\devkitadv\bin ;C:\Program Files\Microsoft Visua
l Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDe
v98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\M
icrosoft Visual Studio\VC98\bin
C:\prog\Hello>set GCC_EXEC_PREFIX=c:/devkitadv/lib/gcc-lib/
C:\prog\Hello>gcc -o hello.elf hello.c -lm
gcc: installation problem, cannot exec `as': No such file or directory
C:\prog\Hello>objcopy -O binary hello.elf hello.gba
'objcopy' is not recognized as an internal or external command,
operable program or batch file.
C:\prog\Hello>pause
Press any key to continue . . .
--------------------------------------------------------------------------------
BATCH FILE USED TO COMPILE:
set PATH=c:\devkitadv\bin;%PATH%
set GCC_EXEC_PREFIX=c:/devkitadv/lib/gcc-lib/
gcc -o hello.elf hello.c -lm
objcopy -O binary hello.elf hello.gba
pause
--------------------------------------------------------------------------------
SOURCE:
/* hello.c - Gameboy Advance Tutorial - Loirak Development */
#define RGB16(r,g,b) ((r)+(g<<5)+(b<<10))
int main()
{
char x,y;
unsigned short* Screen = (unsigned short*)0x6000000;
*(unsigned long*)0x4000000 = 0x403; // mode3, bg2 on
// clear screen, and draw a blue back ground
for(x = 0; x<240;x++) //loop through all x
{
for(y = 0; y<160; y++) //loop through all y
{
Screen[x+y*240] = RGB16(0,0,31);
}
}
// draw a white HI on the background
for(x = 20; x<=60; x+=15)
for(y = 30; y<50; y++)
Screen[x+y*240] = RGB16(31,31,31);
for (x = 20; x < 35; x++)
Screen[x+40*240] = RGB16(31,31,31);
while(1){} //loop forever
}
--------------------------------------------------------------------------------
running xp pro, with an old demo version of ms visual c++ 6...
the compiler is installed in C:\devkitadv\ and the source file and .bat are in C:\prog\hello\