March 30, 2006 undefined references in libgphobos | ||||
---|---|---|---|---|
| ||||
Attachments: | Hi I compiled a crossgcc arm-toolchain with gdc included. But now, there is a problem, I can't fix. I tried to compile a simple Hello World programm with arm-linux-gdc, and it prints some errors. (See attached file). Where could these errors come from? PS: Please excuse my bad english. |
March 31, 2006 Re: undefined references in libgphobos | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paul Bittmann Attachments: | Paul Bittmann schrieb am 2006-03-30: > I compiled a crossgcc arm-toolchain with gdc included. > But now, there is a problem, I can't fix. > I tried to compile a simple Hello World programm with arm-linux-gdc, and > it prints some errors. (See attached file). Where could these errors > come from? > /crosscompile/arm-dev/bin/../lib/gcc/arm-linux/3.4.6/../../../../arm-linux/lib/libgphobos.a(config.o)(.text+0x4): In function `_D3gcc6config8isfiniteFeZi': > arm-linux/gcc/config.d:152: undefined reference to `__isfinitel' correct solution: 1) port d/phobos/std/math.d to your system by adding "version(arm)" and arm specific implementations. 2) port d/phobos/config/* and d/phobos/*.in to Arm dirty solution: 1) open /crosscompile/ ... /include/d/3.4.5/arm-linux/gcc/config.d 2) check the signature type of "__isfinitel": extern(C) int __isfinitel(real); 3) check the the Phobos documentation what that function is supposed to do: "int isfinite(real e); Returns !=0 if e is finite." 4) implement __isfinitel for your system: Endian, size of real... // slow sample // have a look at http://www.digitalmars.com/d/float.html if the code is unclear extern(C) int __isfinitel(real e){ return (e !<>= 0.0) || (e > e.max) || (e < e.min); } 5) append the compiled functions to libgphobos.a with "ar": > gdc -c isfintel_sample.d -o isfintel_sample.o > ar q libgphobos.a isfintel_sample.o Thomas |
Copyright © 1999-2021 by the D Language Foundation