PDA

View Full Version : problems compiling ... (ARM)



21o6
02-07-2007, 11:53 AM
hi :D

i am trying to compile this code in the ide, which i've got from this
forum (i think i've got it from this forum, can't remember).



program helloworld;

{$apptype arm9} //...or arm7
{$define ARM9} //...or arm7, according to apptype

{$mode objfpc} // required for some libc funcs implementation

uses
ctypes; // required by nds headers!

{$include nds.inc} // headers!


var
i: integer;

begin

consoleDemoInit();
videoSetMode(MODE_FB0);
vramSetBankA(VRAM_A_LCD);
printf('Hallo Wereld!'+#10);
printf('www.noeska.com');

for i := 0 to (256 * 192) - 1 do
VRAM_A[i] := RGB15(31,0,0);

while true do;

end.


The compiler tells me:



Recompiling because of C:\FPC214\libnds\nds\arm9\videoGL.inc
Undefined symbol: _consoleDemoInit
Undefined symbol: _vramSetBankA
Undefined symbol: _printf


i have set all needed directorys (accounting to a readme.txt) manually in
the fpc-ide (because it didn't really work with the fpc.cfg in bin\arm-nds).

can anybody help me, pls? i do not understand what i should do to fix
the error...

Legolas
02-07-2007, 12:33 PM
This error, as you have understood, comes because the libraries aren't linked at all. Have you installed the DevkitPro (http://www.devkitpro.org)?

21o6
02-07-2007, 01:25 PM
yes, i have installed it at C:\devkitPro without any errors.

Legolas
02-07-2007, 02:04 PM
I don't use fpc ide, so I can't help you. However, please post here your fpc.cfg file, the directory where you have installed fpc4nds and your %PATH% variable. At least we can try to make it working from command line :)

21o6
02-07-2007, 02:41 PM
i unzipped fpc4nds into my fpc-directory c:\fpc214.


the fpc.cfg in c:\fpc214\bin\arm-nds:

-Tnds
-FuC:\FPC214\units\arm-nds
-XParm-nds-
-FDC:\FPC214\bin\arm-nds
-FiC:\FPC214\libnds
-FlC:\devkitPro\libnds\lib
-FlC:\devkitPro\devkitARM\lib\gcc\arm-eabi\4.1.1
-FlC:\devkitPro\devkitARM\lib\gcc\arm-eabi\4.1.1\thumb
-FlC:\devkitPro\devkitARM\arm-eabi\lib
-FlC:\devkitPro\devkitARM\arm-eabi\lib\thumb


i've set the parameters in the IDE accordingly.

Path:

PATH=c:\devkitPro\msys\bin;C:\WINDOWS\system32;C:\ WINDOWS;C:\WINDOWS\System32\Wbem;C:\FPC214\bin\arm-nds;C:\FPC214\bin\i386-Win32

21o6
02-07-2007, 03:00 PM
does www.pascalgamedevelopment.com have any problems?

the site went offline and my because of that my post wasn't saved.

i wanted to tell you that it is working on the command line using ppcarmnds.exe without any problems. i don't know why i didn't think of
that myself, i thought it should run in the IDE...

nonetheless, thank you for your help and letting me bother you :D