Your code looks fine to me as well. QuoteicefireI could not understand what it means by (0x001<<16) in wpad.h a << b means take the bit representation of 'a' and shift that bit pattern to the left 'b' times. For example, 1 << 1 = 2, the bit pattern for 1 is '0001', and shifting that to the left 1 times gives you, '0010', which isby Michael - Coding
Here's the error I get: main.cpp: In function 'int main(int, char**)': main.cpp:23: error: 'SetStaticTileset' was not declared in this scope The error message says it can't find the SetStaticTileset function, here's how you're calling it in main.cpp: 12 Image image; ... 17 u32 TileHeight = 14; 18 u32 Tiby Michael - Coding
I think my last suggestion is solving the issue the wrong way around. Looking closer at what's in gctypes.h, it first checks if 'boolean' is defined before defining its own version. So the better solution, and likely why this hasn't come up before, is simply to include jpeglib.h before gctypes.h. I hope that works.by Michael - Coding
You can do something like this maybe to work around the conflicting type issue: #include <gctypes.h> #undef boolean #include <jpeglib.h> #define boolean u8 I wouldn't expect the HAVE_BOOLEAN method to work, since you're changing the size of boolean from a 32-bit type in your jpeg header to an 8-bit type in gctypes.h. That would cause problems with function calls aby Michael - Coding
QuoteHow is line 227 of jmorecfg.h and line 22 of gctypes conflicting? In gctypes.h, there's a "#define boolean u8", which would explain the conflict. When you get the crash, is this after deleting all your project's object files and recompiling?by Michael - Coding
That's a weird error. From the format of the first error message, it looks like gcc was being run as a shell script, instead of a binary executable. To narrow things down, are you able to compile a simple program outside of make? For example, if you type this in at your shell prompt, do you get any errors: echo "int foo() {}" > test.c powerpc-gekko-gcc -c test.c What version ofby Michael - Homebrew General
I would call it like: path = trimwhitespace(path);by Michael - Coding
Great, glad to hear you found the issue. As for trimming white space, do a search on ''c char trim trailing spaces", and you should find some code examples. Here's one that looks like it would work.by Michael - Coding
Are you sure you have this function defined properly in your SDL_image lib? In the source code for SDL_image, this function is in an 'ifdef 'else block, where the 'else block defines a trivial version that returns NULL each time you call it. If I disassemble this function in my SDL_image.a, I have the trivial version which returns NULL: 00000000 <IMG_ReadXPMFromArray>by Michael - Coding
Next, I would print out the contents pointed to by your path variable, and see where things start to differ from what you expected. Something like this will dump out the path array (this prints both the character and the hex value for that character): for(i=0; i<=strlen(path); i++) { //note: this prints a dash, -, for non-printables printf("path[%d] = %c (0x%x)\n", i, isprint(paby Michael - Coding
You may have some unprintable control character in the path that you read in, to be 100% sure you're passing the same info to fopen(), add this right before you call fopen(): printf("path strings are %s.\n", strcmp(path, "/config.txt") ? "not equal" : "equal"); If the above says the paths are equal, then I'm out of ideas.by Michael - Coding
*char is the correct type for fopen(). The only way I can see the second one returning NULL, is if you've somehow corrupted your path variable. Right before fopen(), insert a printf("path=%s\n", path) and double check that path is still pointing to your file. If you're still stuck, post the source code and I'll try it out on my end.by Michael - Coding
Both should produce the same results. What problems are you having with the second one?by Michael - Coding