PDA

View Full Version : Errors with FPC4NDS



Relfos
10-11-2010, 12:03 AM
So, I got a new PC and yesterday I downloaded and installed FPC2.4.0 and the latest Devkitpro, I had some old projects that I started some time ago for DS and I want to continue.
After some compilation errors, I found that setup script only worked for an older devkitpro version, so I configured the paths manually. But it still does not work, not even with the demos in 'examples' folder :(



C:\devkitPro\devkitARM\arm-eabi\lib\\libsysbase.a(abort.o): In function `abort':
(.text+0x10): undefined reference to `write'
DisplayList.pp(12,3) Error: Error while linking
DisplayList.pp(12,3) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted


Do anyone knows if there is a way to make it work, or latest version of FPC is not compatible with devkitpro R30?

JSoftware
10-11-2010, 05:20 AM
As far as I remember, it was only compatible with a very specific version of the devkitpro

Legolas
10-11-2010, 11:25 AM
In a couple of days fpc 2.4.2 will be released. It is compatible with devkitARM r32.
However, the error you get comes from the linking order of the libraries. In order to fix it, you should modify the nds9.pp and nds7.pp files in the libndsfpc package:



{$linklib nds9}
{$linklib c}
{$linklib g}
{$linklib gcc}
{$linklib sysbase}It should be (for r30 compatibility):



{$linklib nds9}
{$linklib c}
{$linklib gcc}
{$linklib g}
{$linklib sysbase}

When fixed, you should rebuild the package or, if you want, you could simply use the nds9.pp and nds7.pp as units, without rebuilding the package. :)