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 > devkitPro + Chism's Fat driver

#81737 - SteveH - Mon May 01, 2006 8:34 pm

I'm new to DS development, and I'm trying to get the FAT driver to compile with a simple hello world example.

I'm using the latest version of both FAT library and devkitPro, but I'm unable to get anything to compile without a load of errors.

Is it posible to add the FAT library into the example make files that come with devkit?

I've copied the combined template as a basis of the application I'm trying to develop, but when adding in the fat files I just get error after error :

Code:

d:/Work/NDS/Day1/arm9/source/main.c:46: warning: implicit declaration of function 'FAT_InitFiles'
d:/Work/NDS/Day1/arm9/source/main.c:47: error: 'FAT_FILE' undeclared (first use in this function)
d:/Work/NDS/Day1/arm9/source/main.c:47: error: (Each undeclared identifier is reported only once
d:/Work/NDS/Day1/arm9/source/main.c:47: error: for each function it appears in.)
d:/Work/NDS/Day1/arm9/source/main.c:47: error: 'handle' undeclared (first use in this function)
d:/Work/NDS/Day1/arm9/source/main.c:47: warning: implicit declaration of function 'FAT_fopen'
d:/Work/NDS/Day1/arm9/source/main.c:48: warning: implicit declaration of function 'FAT_fseek'
d:/Work/NDS/Day1/arm9/source/main.c:49: warning: implicit declaration of function 'FAT_ftell'
d:/Work/NDS/Day1/arm9/source/main.c:52: warning: implicit declaration of function 'FAT_fread'
d:/Work/NDS/Day1/arm9/source/main.c:53: warning: implicit declaration of function 'FAT_fclose'
make[2]: *** [main.o] Error 1
make[1]: *** [build] Error 2


I have added the *.c and *.h files to my project (so I've now got a huge amount of .o files), but I'm still getting the errors above.

Is there any way to just add the #include "nds_fat.h" file to the relivant source file and let devkitPro add in the fat lib as a pre-compiled bit of code?

#81741 - SteveH - Mon May 01, 2006 8:56 pm

Nevermind, I got it to work - I'd mangled the makefile to try and get it to work, thus it was compiling incorrectly.