Advertising (This ad goes away for registered users. You can Login or Register)

zlib and libpng

Forum rules
Forum rule Nº 15 is strictly enforced in this subforum.
Post Reply
npissoawsome
Posts: 32
Joined: Mon Mar 19, 2012 10:01 pm

zlib and libpng

Post by npissoawsome » Wed Mar 21, 2012 9:50 pm

I'm following this tutorial: http://www.psp-programming.com/tutorials/c/lesson04.htm
and it says I need zlib and libpng, and it tells me to get them by doing this in terminal

Code: Select all

svn checkout svn://svn.pspdev.org/psp/trunk/zlib 
cd zlib
make
make install
Everything works fine until I get to make install, and then it gives me these errors

Code: Select all

cp: cannot create regular file `/usr/local/pspdev/psp/include/zlib.h': Permission denied
cp: cannot create regular file `/usr/local/pspdev/psp/include/zconf.h': Permission denied
So, I ran it with

Code: Select all

sudo make install
and now it gives me this error

Code: Select all

make: psp-config: Command not found
Makefile:9: /lib/build.mak: No such file or directory
make: *** No rule to make target `/lib/build.mak'.  Stop.
so I looked at line 9 in the make file and it is this

Code: Select all

include $(PSPSDK)/lib/build.mak
I'm assuming it's running into this error, because it can't find the build.mak file, so I tried to give it the full path

Code: Select all

include /usr/local/pspdev/psp/sdk
but then it gives me this error

Code: Select all

make: psp-config: Command not found
/usr/local/pspdev/psp/sdk/lib/build.mak:15: *** $(PSPSDK) is undefined.  Use "PSPSDK := $(shell psp-config --pspsdk-path)" in your Makefile.  Stop.
and the whole make file is this

Code: Select all

PSPSDK=$(shell psp-config --pspsdk-path)
PSPDIR=$(shell psp-config --psp-prefix)
TARGET_LIB = libz.a
OBJS = 	adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
	zutil.o inflate.o infback.o inftrees.o inffast.o

CFLAGS = -O2 -G0

include $(PSPSDK)/lib/build.mak

install: $(TARGET_LIB)
	@echo "Installing libz into $(PSPDIR)"
	@mkdir -p $(PSPDIR)/include $(PSPDIR)/lib
	@cp zlib.h zconf.h $(PSPDIR)/include
	@cp libz.a  $(PSPDIR)/lib
	@echo "Done"
If anyone could tlel me how to fix this error, that would be great :)

And sorry, I'm still quite a noob
Advertising

User avatar
NightStar3
VIP
Posts: 364
Joined: Mon Sep 27, 2010 8:22 pm

Re: zlib and libpng

Post by NightStar3 » Wed Mar 21, 2012 9:57 pm

Try doing

Code: Select all

sudo bash
before calling

Code: Select all

make install


It should give you the privs needed to copy the files.
Advertising

npissoawsome
Posts: 32
Joined: Mon Mar 19, 2012 10:01 pm

Re: zlib and libpng

Post by npissoawsome » Wed Mar 21, 2012 10:03 pm

NightStar3 wrote:Try doing

Code: Select all

sudo bash
before calling

Code: Select all

make install


It should give you the privs needed to copy the files.
thanks :] it worked

awesome, libpng works too now, and I was able to compile my code with graphics.h and png.h

Post Reply

Return to “Programming and Security”