libpng needs pow

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post 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.
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.
cory1492
Posts: 216
Joined: Fri Dec 10, 2004 1:49 pm

Post by cory1492 »

for those of us with no currently running compiler, wheres the place to stick the -lm? makefile?
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post 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.
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.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post 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.
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.
Post Reply