Page 1 of 1

Posted: Tue Apr 12, 2005 4:46 am
by pixel
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.

Posted: Tue Apr 12, 2005 9:19 am
by cory1492
for those of us with no currently running compiler, wheres the place to stick the -lm? makefile?

Posted: Tue Apr 12, 2005 5:22 pm
by pixel
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.

Posted: Tue Apr 12, 2005 8:35 pm
by pixel
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:

Code: Select all

int vsscanf(const char * s, const char * f, va_list a) { return 0; }
This will allow it to link, but won't allow xpm support.