Welcome! Log In Create A New Profile

Advanced

[solved] include libfat ubuntu linux

Posted by balta 
[solved] include libfat ubuntu linux
January 21, 2009 04:56PM
i set up everything just as explained at wiibrew.

i compiled the helloworld example and everything was ok

the i tried to compile the grrlib day 7 tut

and i get:
$ make
linking ... grrlib7.elf
/home/balta/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-gekko/4.2.4/../../../../powerpc-gekko/bin/ld: cannot find -lfat
collect2: ld returned 1 exit status
make[1]: *** [/home/balta/projects/wii/grrlib7/grrlib7.elf] Error 1
make: *** [build] Error 2
and there is not .elf/.dol file (obviously...)

i tried to edit the makefile removing -lfat from the LIBS: line that i believe is not needed and everything compiled fine

i then restored the original makefile and put the libfat.a, which i downloaded from wiibrew, in the include folder and everything was ok

in order to use the libfat i must always put the libfat.a in the include folder of my project or there is another way so it's always included (as it is under windows, where i could compile the very same example -actually i tried to compile the same files i had already compiled under windows- without any error) ?

thanks



Edited 1 time(s). Last edit at 01/21/2009 09:04PM by balta.
Re: include libfat ubuntu linux
January 21, 2009 06:37PM
Hi balta,

You need to add -L<path_to_libfat_dir> to the LIBS variable in your Makefile. So if your libfat.a is in /tools/fat/lib, your LIBS line would have something like this in it: -L/tools/fat/lib -lfat
Sorry, only registered users may post in this forum.

Click here to login