0 Members and 2 Guests are viewing this topic.
#include <gmp.h> // Would the compiler find the library it points to and use it?
#!/bin/sh# This creates a "gmp" subdirectory whereever you launch the script, and compiles and installs in subdirectories thereof.mkdir gmpcd gmpWORKING_DIR=`pwd`wget ftp://ftp.gmplib.org/pub/gmp-5.0.4/gmp-5.0.4.tar.bz2 || exit 1tar xvjf gmp-5.0.4.tar.bz2 || exit 1mv gmp-5.0.4 srcmkdir buildmkdir prefixcd build../src/configure --host=arm-none-eabi --prefix="$WORKING_DIR/prefix" --enable-shared=no --enable-assert || exit 1make && make install
LDFLAGS = -L /home/philip/gmp/prefix/ -lgmp -nostdlib
osstub.c:6:18: error: conflicting types for ‘_ssize_t’/home/philip/lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/include/sys/_types.h:56:13: note: previous declaration of ‘_ssize_t’ was hereosstub.c:8:18: error: conflicting types for ‘_off_t’/home/philip/lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/include/sys/_types.h:16:14: note: previous declaration of ‘_off_t’ was heremake[1]: *** [osstub.o] Error 1make: *** [hello.tns] Error 2
hello.o: In function `main':hello.c:(.text.startup+0x18): undefined reference to `__gmpz_init'hello.c:(.text.startup+0x2c): undefined reference to `__gmpz_set_str'hello.c:(.text.startup+0x34): undefined reference to `__gmpz_init'hello.c:(.text.startup+0x44): undefined reference to `__gmpz_pow_ui'hello.c:(.text.startup+0x54): undefined reference to `__gmp_printf'collect2: ld returned 1 exit statusmake: *** [hello.tns] Error 1
GCCFLAGS = -I/home/philip/gmp/prefix/include -Os -nostdlib -Wall -W -marmLDFLAGS = -L/home/philip/gmp/prefix/lib -lgmp -nostdlib