Seems like the reason was something little different. I had to extern "C" the include of dirent.h for some reason (like I said, it worked on other compilers) and put it outside of my function.
Probably was bad practice to do so anyways, but I had it like that because it was part of conditional preprocessor code, heh.
But thanks for the help. Wouldn't have thought of extern "C" without it.
Edit: I also had to notice that the SDL_mixer here has Mix_LoadMUS_RW(SDL_RWops*) instead of Mix_LoadMUS_RW(SDL_RWops*, int). I could adapt my code to that, of course, but I was wondering if the version in PND might be outdated?
Another Edit:
I just can't make my app run standalone when the Code::Blocks PND isn't mounted. I do have all required libs in app folder (and it's linked to load them from there), heck, I even tried with all libs the PND ships copied in.
There is no missing lib error message, but it segfaults at XGetICValues according to gdb. This seem to be when I try to init my SDL screen and OpenGLES stuff.
Dunno if that helps, but if I reset the LD_LIBRARY_PATH while the Code::Blocks PND is still mounted, my app still works. So can I assume it's not related to missing libs? If so, what kind of other magic is the PND doing?
I'm grateful for any help here, although I fear the edit not to be seen so soon. I'm not in a hurry, it's just a bit frustrating.