undefined reference to `nitroFSInit'
Posted: Fri Dec 20, 2019 4:24 am
So I'm trying to work on the rom directory. I can't seem to build the program because of the "filesystem.h" not working properly. For example here is my error:
w:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld.exe: main.o: in function `filesysInitalize()':
W:/devkitPro/examples/nds/ChristmasApartments/current/include/filesys.h:16: undefined reference to `nitroFSInit'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/devkitARM/ds_rules:54: /opt/devkitpro/examples/nds/ChristmasApartments/current/current.elf] Error 1
For whatever reason, its not linking nitroFSInit with the libraries. What's even more confusing is the barebones code it's trying to exec and failing:
That is it. Am i missing something or am i just stupid? Im trying to learn libnds also so its possible it could be a programmer error.
w:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld.exe: main.o: in function `filesysInitalize()':
W:/devkitPro/examples/nds/ChristmasApartments/current/include/filesys.h:16: undefined reference to `nitroFSInit'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/devkitARM/ds_rules:54: /opt/devkitpro/examples/nds/ChristmasApartments/current/current.elf] Error 1
For whatever reason, its not linking nitroFSInit with the libraries. What's even more confusing is the barebones code it's trying to exec and failing:
Code: Select all
#ifndef FILESYS_H
#define FILESYS_H
#include <nds.h>
#include <filesystem.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
int filesysInitalize()
{
iprintf("Initializing the filesys... ");
int iResult = nitroFSInit(NULL);
iprintf("%i \n", iResult);
return 0;
}
#endif