Linker error cross compiling for raspberry pi
Jackson Slater
sjjkb at gmail.com
Mon May 13 20:29:06 UTC 2019
I am using ubuntu, trying to cross compile a d application for
Raspberry pi.
I installed the "gdc-8-arm-linux-gnueabihf" package, but now when
I try to compile, I get a linker error:
trying to cross-compile this:
---
import std.stdio;
void main()
{
writeln("Hello, Pi!");
}
---
But when I compile (using the command `arm-linux-gnueabihf-gdc-8
main.d`) I get this error:
---
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/libgphobos.so: undefined
reference to `deflateInit_'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/libgphobos.so: undefined
reference to `deflateInit2_'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/libgphobos.so: undefined
reference to `deflate'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/libgphobos.so: undefined
reference to `compress2'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/libgphobos.so: undefined
reference to `deflateEnd'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/libgphobos.so: undefined
reference to `crc32'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/libgphobos.so: undefined
reference to `inflate'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/libgphobos.so: undefined
reference to `inflateInit2_'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/libgphobos.so: undefined
reference to `inflateInit_'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/libgphobos.so: undefined
reference to `inflateEnd'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/libgphobos.so: undefined
reference to `inflateBackInit_'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/libgphobos.so: undefined
reference to `adler32'
collect2: error: ld returned 1 exit status
---
Can anyone help me fix this?
Thanks
More information about the Digitalmars-d
mailing list