Add -lm for the common pow function.
For the *scanf error, it simply mean the software you're compiling uses scanf or a derivate, and we don't support that function inside the ps2sdk.
libpng needs pow
LDFLAGS variable in the makefile, before -lc.
Here is the biggest "canonical" LDFLAGS you could have, if you're running a big project:
-L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L$(PS2SDK)/ports/lib $(PS2SDK)/ee/startup/crt0.o -lsdl -lgskit -ldmakit -lkbd -lmouse -lpad -lcdvd -lstdc++ -lz -lm -lmc -lc -lmc -lkernel -mno-crt0 -T $(PS2SDK)/ee/startup/linkfile
I am just giving it as a hint about link order. You should in no way use it as it: just take the components you need.
Here is the biggest "canonical" LDFLAGS you could have, if you're running a big project:
-L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L$(PS2SDK)/ports/lib $(PS2SDK)/ee/startup/crt0.o -lsdl -lgskit -ldmakit -lkbd -lmouse -lpad -lcdvd -lstdc++ -lz -lm -lmc -lc -lmc -lkernel -mno-crt0 -T $(PS2SDK)/ee/startup/linkfile
I am just giving it as a hint about link order. You should in no way use it as it: just take the components you need.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
Okay, one thing at a time.
First, your cvs directory containing the ps2sdk sources should NOT be in /usr/local/ps2dev/ps2sdk. Keep that as a separate directory.
Now, about scanf, I can see somebody using sscanf into sdlimage. Bad. Bad. But this is for the .xpm support, so I guess you simply don't care. To solve this, add this to your main sourcecode:
This will allow it to link, but won't allow xpm support.
First, your cvs directory containing the ps2sdk sources should NOT be in /usr/local/ps2dev/ps2sdk. Keep that as a separate directory.
Now, about scanf, I can see somebody using sscanf into sdlimage. Bad. Bad. But this is for the .xpm support, so I guess you simply don't care. To solve this, add this to your main sourcecode:
Code: Select all
int vsscanf(const char * s, const char * f, va_list a) { return 0; }
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.