Hi,
I have question about cross compiler C library.
Seems that CT gnu toolchain uses glibc but I need uClibc
I think there is different C library because CT compiler generates linking errors:
c:\codetyphon\fpc\bin\i386-win32\mipsel-linux-ld.exe: warning: link.res contains output sections; did you forget -T?
.\librayd\/libctest5.so: undefined reference to `__divdf3@GCC_3.0'
.\librayd\/libctest5.so: undefined reference to `__adddf3@GCC_3.0'
program itself is very simple test, shared library is wroted in C and also tested in mipsel based openwrt-linux router.
C library code:
double mean(double a, double b)
{
return (a+b) / 2;
}
my pascal test program:
program static_lib;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes
{ you can add units after this };
const my_lib = 'libctest5.so';
function mean(a: double; b:double): double; cdecl; external my_lib;
begin
WriteLn('Library linkimise test.Kalkuleerib library', mean(100,45));
end.
Is there a way to build cross compiler using different C library?
Regards
Ermo