0 Members and 2 Guests are viewing this topic.
Is it portable?
nspire-gcc -Os -Wall -W -marm -c main.cmain.c: In function 'main':main.c:5:2: error: unknown type name 'nioconsole'main.c:9:2: warning: passing argument 1 of 'nio_InitConsole' from incompatible pointer type [enabled by default]\Users\Gebruiker\Downloads\ndless-v3.1-beta-r695-sdk\ndless-v3.1-beta-r695-sdk/ndless/bin/../3rd/nspireio/include/nspireio2.h:117:6: note: expected 'struct nio_console *' but argument is of type 'int *'main.c:10:2: warning: passing argument 1 of 'nio_DrawConsole' from incompatible pointer type [enabled by default]\Users\Gebruiker\Downloads\ndless-v3.1-beta-r695-sdk\ndless-v3.1-beta-r695-sdk/ndless/bin/../3rd/nspireio/include/nspireio2.h:122:6: note: expected 'struct nio_console *' but argument is of type 'int *'main.c:11:2: warning: passing argument 1 of 'nio_printf' from incompatible pointer type [enabled by default]\Users\Gebruiker\Downloads\ndless-v3.1-beta-r695-sdk\ndless-v3.1-beta-r695-sdk/ndless/bin/../3rd/nspireio/include/nspireio2.h:172:6: note: expected 'struct nio_console *' but argument is of type 'int *'main.c:13:2: warning: passing argument 1 of 'nio_CleanUp' from incompatible pointer type [enabled by default]\Users\Gebruiker\Downloads\ndless-v3.1-beta-r695-sdk\ndless-v3.1-beta-r695-sdk/ndless/bin/../3rd/nspireio/include/nspireio2.h:196:6: note: expected 'struct nio_console *' but argument is of type 'int *'make: *** [main.o] Error 1Built.
#include <os.h>#include <nspireio2.h>int main(void) { nioconsole csl; lcd_ingray(); clrscr(); //53 col, 29 row, 0px offset for x/y, bgcolor, fgcolor nio_InitConsole(&csl, 53, 29, 0, 0, 0, 15); nio_DrawConsole(&csl); nio_printf(&csl, "Hello World!"); wait_key_pressed(); nio_CleanUp(&csl); return 0;}
I'm wondering if there's a tutorial for nspire c programming?
Good stuff! I do hope though that ExtendeD fixes the trunk to make the old ndless building work... (If you don't know, r632 ish is the only revision that does not have the SDK, and still has the nspire-gcc and friends work.)
link=topic=14288.msg260691#msg260691 date=1346002418]Actually, could the SDK be separated from the ndless tree? It's a lot to download for a Linux user, like me!
Quote from: alberthrocks on August 26, 2012, 01:33:38 pmGood stuff! I do hope though that ExtendeD fixes the trunk to make the old ndless building work... (If you don't know, r632 ish is the only revision that does not have the SDK, and still has the nspire-gcc and friends work.)Hm, what's wrong with it exactly?
Replace nioconsole with nio_console in line 5