gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > gbfs problem

#70776 - genfish - Wed Feb 08, 2006 6:30 pm

hey,

Im using the tutorials from doublec to make an extended rotation background from a jpeg image. I have separated the code into separate source files, and when i include gbfs.h i get the following errors:
Quote:
In file included from g:/Dissertation/DSGame/arm9/source/background.h:8,
from g:/Dissertation/DSGame/arm9/source/background.c:1:
c:/devkitPro/libnds/include/gbfs.h:90: error: syntax error before 'size_t'
c:/devkitPro/libnds/include/gbfs.h:96: error: syntax error before 'gbfs_count_o
js'
c:/devkitPro/libnds/include/gbfs.h:96: warning: type defaults to 'int' in decla
ation of 'gbfs_count_objs'
c:/devkitPro/libnds/include/gbfs.h:96: warning: data definition has no type or
torage class
make[2]: *** [background.o] Error 1
make[1]: *** [build] Error 2
make[1]: Leaving directory `/g/Dissertation/DSGame/arm9'
make: *** [arm9/DSGame.elf] Error 2


could this be something to do with me using the makefile from the devkitpro combined template?

thanks for your time

#70806 - genfish - Wed Feb 08, 2006 10:19 pm

think i fixed it, it wasnt recognizing size_t so i included <stddef.h> and it compiles. havent used any of the functions yet tho :/

#113632 - UltraJoe - Fri Dec 29, 2006 10:27 am

I am getting a similar error:

Code:
c:/NDS/nds01/arm9/source/gbfs.h(72): error: expected declaration specifiers or '...' before 'size_t'
c:/NDS/nds01/arm9/source/gbfs.h(78): error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gbfs_count_objs'


I have tried including <stddef.h> but it makes no difference.

Any ideas?

#113645 - OOPMan - Fri Dec 29, 2006 12:37 pm

That's usually a sign that you're using gcc when you should be using g++, or vice versa...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...

#113659 - tepples - Fri Dec 29, 2006 3:09 pm

GBFS is a library written in C. When using GBFS from a C++ program, you have to at least do this:
Code:

extern "C" {
#include "gbfs.h"
}

Given that I don't use C++ on the GBA or GBFS on the DS, I haven't really had a chance to test this.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.