Excuse me, I have a doubt about the Double_Buffer example in nds-examples-20090531.tar.bz2. When I try to compile, gives this output when I change extension from cpp to c in orden to use c99, then I add -std=c99 to CFLAGS in the Makefile:
make
main.c
arm-eabi-gcc -MMD -MP -MF /mnt/hd/osuna/knightmare/cv/build/main.d -g -Wall -O2 -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -std=c99 -mthumb -mthumb-interwork -I/mnt/hd/osuna/knightmare/cv/include -I/opt/devkitpro/libnds/include -I/opt/devkitpro/libnds/include -I/mnt/hd/osuna/knightmare/cv/build -DARM9 -c /mnt/hd/osuna/knightmare/cv/src/main.c -o main.o
In file included from /opt/devkitpro/libnds/include/nds.h:198,
from /mnt/hd/osuna/knightmare/cv/src/main.c:3:
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:141: warning: declaration does not declare anything
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:149: warning: declaration does not declare anything
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:150: warning: declaration does not declare anything
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:151: warning: declaration does not declare anything
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:157: warning: declaration does not declare anything
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:166: warning: declaration does not declare anything
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:171: warning: declaration does not declare anything
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:172: warning: declaration does not declare anything
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:173: warning: declaration does not declare anything
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:174: warning: declaration does not declare anything
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:183: warning: declaration does not declare anything
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:186: warning: declaration does not declare anything
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:191: warning: declaration does not declare anything
In file included from /opt/devkitpro/libnds/include/nds.h:198,
from /mnt/hd/osuna/knightmare/cv/src/main.c:3:
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:293: warning: declaration does not declare anything
/opt/devkitpro/libnds/include/nds/arm9/sprite.h: In function 'oamAffineTransformation':
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:434: error: 'OamState' has no member named 'oamRotationMemory'
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:435: error: 'OamState' has no member named 'oamRotationMemory'
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:436: error: 'OamState' has no member named 'oamRotationMemory'
/opt/devkitpro/libnds/include/nds/arm9/sprite.h:437: error: 'OamState' has no member named 'oamRotationMemory'
/mnt/hd/osuna/knightmare/cv/src/main.c: In function 'main':
/mnt/hd/osuna/knightmare/cv/src/main.c:22: warning: implicit declaration of function 'iprintf'
make[1]: *** [main.o] Error 1
make: *** [build] Error 2
I look for 'oamRotationMemory' from OamState in sprite.h and seem that is declared inside an anonymous union, so I google if is valid in c99 and I found it is only valid in c++. So my question is: what can I do in orden to compile programs in c99? Hope somebody can help me because I am so thrilled to develop stuff in the DS. Thank you.
P.D.: pardon my english, is not my mother tounge.
libnds 1.3.7 & c99 problem
-
- Site Admin
- Posts: 2004
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: libnds 1.3.7 & c99 problem
use -std=gnu99 instead of -std=c99.
The lack of anonymous structs and unions in C99 is a giant pain in the backside
The lack of anonymous structs and unions in C99 is a giant pain in the backside
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest