Welcome! Log In Create A New Profile

Advanced

libfat issue

Posted by icefire 
libfat issue
January 02, 2009 09:10PM
I have libfat installed and working but the app I am trying to code/compile relies on PI_INTERNAL_SD and more constants like that (starting with PI, one for SDGecko in each port and a one for USB storage).

However, there is no definition of those in the new libfat.....does anyone have an older version they can tell me what the values are?
Re: libfat issue
January 02, 2009 10:52PM
Here's how they're defined in my older libfat include:
#if defined(__wii__)
typedef enum {PI_DEFAULT, PI_SDGECKO_A, PI_SDGECKO_B, PI_INTERNAL_SD, PI_CUSTOM } PARTITION_INTERFACE;
#else

So PI_DEFAULT=0, PI_SDGECKO_A=1, etc.

If I were you, I'd either compile with the older libogc/libfat where these are defined, or port the libfat calls in the code you're compiling to the latest libfat.
Re: libfat issue
January 03, 2009 01:56AM
Thanks!

but now I get the dreaded:
"Undefined reference to 'GetDeviceOpTab'"

And I AM using the official libOGC and libfat....
Re: libfat issue
January 03, 2009 05:17AM
I haven't seen that error before. I tried compiling and linking a source file with that symbol and I had no trouble resolving it. Here's my little test program:

#include <sys/iosupport.h>

int main() {
  const devoptab_t *ptr;

  ptr = GetDeviceOpTab ("test");

  return 0;
}
I used the example Makefile from the libogc examples. Here are the libraries that were included on the link line:
-lfat -lwiiuse -lbte -logc -lm

If you're still stuck on the undefined reference error, I'd try to compile the above to see if you get the same undefined reference error. If you do, then either I'm linking something differently than you, or our libraries are different.
Re: libfat issue
January 03, 2009 07:45AM
It was an old DevKitPPC release, fixed now :).
Sorry, only registered users may post in this forum.

Click here to login