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 > fat.h loads, but fatInitDefault() is unknown.

#160026 - Bolke - Wed Jul 09, 2008 3:21 pm

I've copied an example project, namely C:\devkitPro\examples\nds\templates\arm9

I've added #include <fat.h>, and in the main function I've added
fatInitDefault();

When I try to compile it, I get this error:
c:/ds_projects/arm9/source/main.c:34: undefined reference to fatInitDefault'

Does someone know what I'm doing wrong?
_________________
My code doesn't contain bugs, it develops random features.

#160027 - eKid - Wed Jul 09, 2008 3:25 pm

My guess is that you forgot to add libfat to your library list, in the makefile.
Code:
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS   := -lfat -lnds9

#160031 - Bolke - Wed Jul 09, 2008 3:40 pm

Thanks, that was it.
_________________
My code doesn't contain bugs, it develops random features.