| Noob Questions about Porting |
| << < (2/2) |
|
ExtendeD: -L and -l should be in LDFLAGS. CFLAGS should contain -I /path/to/the/include/directory, that contains gmp.h. |
|
sammyMaX: It finds the library and header now, but gives off these errors: Code: Select All | Copy To Clipboard 1 2 3 4 5 6 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 here osstub.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 here make[1]: *** [osstub.o] Error 1 make: *** [hello.tns] Error 2 clip = new ZeroClipboard.Client();clip.setHandCursor( true );clip.glue("a-1");clip.setText(StripHTML("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 here osstub.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 here make[1]: *** [osstub.o] Error 1 make: *** [hello.tns] Error 2"))What are _ssize_t and _off_t? Edit: I don't think these errors are related to GMP at all - compiling the normal Hello.c gives me the same errors. Any help? |
|
Lionel Debroux: Upgrade your Ndless version to the latest version :) Off-topic: I know that you're not making an Lua project, but this topic somehow made me wonder whether there are Lua bindings for GMP... and I found one: http://www.dkrogers.com/doug/lua/ . But it was made years ago, so if it is to be ported to the Nspire, it would require quite a bit of work, potentially on the Lua binding side and definitely on the GMP side. Combining that, with the support for native Lua extensions of the latest Ndless SVN versions (Omnimaga news / TI-Planet news), could showcase an interesting cooperation between Lua and native code. This is exactly the sort of thing that would benefit both users and TI, but TI will certainly kill it in ~10 days alongside the current iteration of Ndless in ~10 days, notwithstanding our freedom to tinker. |
|
sammyMaX: Lua and GMP would be interesting, and it's a shame that TI doesn't open up to third-party development, because it could help them tremendously... Anyways, I try to build my little program and it now gives me these errors: Code: Select All | Copy To Clipboard 1 2 3 4 5 6 7 8 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 status make: *** [hello.tns] Error 1 clip = new ZeroClipboard.Client();clip.setHandCursor( true );clip.glue("a-2");clip.setText(StripHTML("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 status make: *** [hello.tns] Error 1"))Could this be because it is trying to use the wrong version of GMP (an i386 one) or is it still a problem in my makefile? Here are my builder and linker flags: Code: Select All | Copy To Clipboard 1 2 GCCFLAGS = -I/home/philip/gmp/prefix/include -Os -nostdlib -Wall -W -marm LDFLAGS = -L/home/philip/gmp/prefix/lib -lgmp -nostdlib clip = new ZeroClipboard.Client();clip.setHandCursor( true );clip.glue("a-3");clip.setText(StripHTML("GCCFLAGS = -I/home/philip/gmp/prefix/include -Os -nostdlib -Wall -W -marm LDFLAGS = -L/home/philip/gmp/prefix/lib -lgmp -nostdlib")) |
| Navigation |
| Message Index |
| Previous page |