forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OSK Libraries
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Jun 22, 2009 10:00 pm    Post subject: Reply with quote

If the danzeff file is .c, you need to make sure it's compiled with gcc, not g++. If you changed it to .cpp, you need the make sure you have extern "C" {} in the danzeff.cpp file AS WELL AS the h file. Otherwise, the names won't match.
Back to top
View user's profile Send private message AIM Address
kralyk



Joined: 06 Apr 2008
Posts: 114
Location: Czech Republic, central EU

PostPosted: Mon Jun 22, 2009 11:46 pm    Post subject: Reply with quote

Quote:
BUILD_PRX means that I'm working on a PRX which I'm not (right?)

Well depends on firmware, if your fw is 1.50 then youre working on ELF, if you build for modern fw like 3xx/4xx/5xx then you need to build PRX even for EBOOTS.

At least I was told so, and it worked...
_________________
...sorry for my english...
Back to top
View user's profile Send private message
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Tue Jun 23, 2009 3:18 pm    Post subject: Reply with quote

J.F. wrote:
If the danzeff file is .c, you need to make sure it's compiled with gcc, not g++. If you changed it to .cpp, you need the make sure you have extern "C" {} in the danzeff.cpp file AS WELL AS the h file. Otherwise, the names won't match.


So that extern "C" {} part isn't needed if I'm working withoud renamed .cpp files?
And do you have any good article which explains that extern thingy?
_________________
Producted.net
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Tue Jun 23, 2009 4:57 pm    Post subject: Reply with quote

Producted wrote:
J.F. wrote:
If the danzeff file is .c, you need to make sure it's compiled with gcc, not g++. If you changed it to .cpp, you need the make sure you have extern "C" {} in the danzeff.cpp file AS WELL AS the h file. Otherwise, the names won't match.


So that extern "C" {} part isn't needed if I'm working withoud renamed .cpp files?
And do you have any good article which explains that extern thingy?


As long as you also compile the .c files with psp-gcc and not psp-g++, no it's not needed. The extern "C" {} is for c++ to tell the compiler not to mangle the name as whatever is inside {} is c code with c naming conventions.

As for where it's explained, read any C++ book, specifically the part concerned with using C with C++.
Back to top
View user's profile Send private message AIM Address
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Wed Jun 24, 2009 3:12 pm    Post subject: Reply with quote

I'm compiling with psp-gcc, so that can't be problem. Any other ideas?
_________________
Producted.net
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Wed Jun 24, 2009 6:38 pm    Post subject: Reply with quote

I think we need to see everything at this point. Trying to describe the problem and posting little snippets (other than the makefile) isn't getting us anywhere.

One thing, though, looking back over earlier posts - you are including libstdc++, so this should be a C++ app, however, the error quote shows the main file as main.c. It's quite possible that main is the problem. You probably need to change main.c to main.cpp and put extern "C" {} around the PSP callbacks, leaving main() as c++. Your project seems to be a crazy mix of c and c++, which is probably what is causing your trouble. Look at the main_psp.cpp from Basilisk II for an idea of how to do a C++ main for the PSP.
Back to top
View user's profile Send private message AIM Address
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Thu Jun 25, 2009 9:14 pm    Post subject: Reply with quote

Here we go again:

Makefile:
Code:

TARGET = GPOS
OBJS = main.o danzeff.o

LIBS = -libstdc++ -lpsprtc -lpspwlan -lpspgum -lpspgu -lpspaudio -lm -lpsppower
LIBDIR = $(PSPDEV)/SDK/lib

CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = GPOS

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak


main.c: http://producted.pastebin.com/m3cc2c1ba
Don't comment on my 'bad' variable naming etc, it's still v0.1a x)

What else do you need?
_________________
Producted.net
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Thu Jun 25, 2009 11:41 pm    Post subject: Reply with quote

Well, your module info isn't complete

Code:
PSP_MODULE_INFO("Name", 0, PSP_VERS, PSP_REVS);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
PSP_HEAP_SIZE_KB(-256);


and in the makefile right after the flags you should have

Code:
BUILD_PRX = 1
PSP_FW_VERSION = 500
PSP_LARGE_MEMORY = 1


That would make an authentic 3.xx user mode app. Right now, there's no telling what your app will turn out as.

And finally, since this is C++, you need to alter the makefile to specifically use psp-gcc to compile any .c files by adding an all target to the makefile to do so. Right before the last two lines, add

Code:
all: main.o danzeff.o $(EXTRA_TARGETS) $(FINAL_TARGET)

main.o: main.c
   $(CC) $(CFLAGS) -c $< -o $@

danzeff.o: danzeff.c
   $(CC) $(CFLAGS) -c $< -o $@


If you don't specify the .c files explicitly, they'll implicitly be compiled with psp-g++ instead for c++ projects. Why are you making this a c++ project when you don't seem to have any c++ files yet?
Back to top
View user's profile Send private message AIM Address
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Fri Jun 26, 2009 3:20 am    Post subject: Reply with quote

Makefile:
Quote:

TARGET = GPOS
OBJS = main.o danzeff.o

PSP_MODULE_INFO("GPOS", 0, PSP_VERS, PSP_REVS);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
PSP_HEAP_SIZE_KB(-256);

LIBS = -libstdc++ -lpsprtc -lpspwlan -lpspgum -lpspgu -lpspaudio -lm -lpsppower
LIBDIR = $(PSPDEV)/SDK/lib

CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

BUILD_PRX = 1
PSP_FW_VERSION = 500
PSP_LARGE_MEMORY = 1


EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = GPOS

all: main.o danzeff.o $(EXTRA_TARGETS) $(FINAL_TARGET)

main.o: main.c
$(CC) $(CFLAGS) -c $< -o $@

danzeff.o: danzeff.c
$(CC) $(CFLAGS) -c $< -o $@

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak


Console output:
Quote:

makefile:4 *** missing seperator. Stop.


They you should be more specific with errors. :( Which / what seperator? And makefile:4 means at line 4?

And yet again, thanks that you are still helping me, even on the second page. :D
_________________
Producted.net
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri Jun 26, 2009 3:37 am    Post subject: Reply with quote

You need a tab to start the $(CC) lines... stupid make can't handle spaces.
Back to top
View user's profile Send private message AIM Address
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Fri Jun 26, 2009 4:54 am    Post subject: Reply with quote

Nope, still getting the same error.
_________________
Producted.net
Back to top
View user's profile Send private message
psPea



Joined: 01 Sep 2007
Posts: 64

PostPosted: Fri Jun 26, 2009 5:35 am    Post subject: Reply with quote

Code:
PSP_MODULE_INFO("GPOS", 0, PSP_VERS, PSP_REVS);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
PSP_HEAP_SIZE_KB(-256);
Is not suppose to be in your makefile
put it in your main.c
_________________
Click ME!
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri Jun 26, 2009 6:14 am    Post subject: Reply with quote

Yeah... that goes in main.c. Funny I didn't notice it, but I wasn't looking for it. :)
Back to top
View user's profile Send private message AIM Address
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Fri Jun 26, 2009 7:13 pm    Post subject: Reply with quote

Okay fixed that.

Now we are at this point again:
Quote:

C:\pspdev\projects\GPOS>make
psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall -LC:/pspdev/SDK/lib -L. -
LC:/pspdev/psp/sdk/lib -specs=C:/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-TC:/pspdev/
psp/sdk/lib/linkfile.prx main.o danzeff.o C:/pspdev/psp/sdk/lib/prxexports.o -
lpsprtc -lpspwlan -lpspgum -lpspgu -lpspaudio -lm -lpsppower -lpspdebug -lpspdis
play -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspn
et_resolver -lpsputility -lpspuser -lpspkernel -o GPOS.elf
main.o: In function `main':
main.c:(.text+0xf4): undefined reference to `danzeff_load'
main.c:(.text+0x178): undefined reference to `danzeff_render'
collect2: ld returned 1 exit status
make: *** [GPOS.elf] Error 1

_________________
Producted.net
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat Jun 27, 2009 1:09 am    Post subject: Reply with quote

Well, post the danzeff file now... both of them.
Back to top
View user's profile Send private message AIM Address
ne0h



Joined: 21 Feb 2008
Posts: 386

PostPosted: Sat Jun 27, 2009 1:18 am    Post subject: Reply with quote

Oh yess....
You haven't basically defined if you want to use DANZEFF_SDL or DANZEFF_SCEGU...
Try to define this or comment out #ifdefs it works great...
I've get this problem some months ago, but to resolve I've tried to do what you have to do....just read... ;)
Code:

//Set which renderer target to build for
/* #define DANZEFF_SDL */
/* #define DANZEFF_SCEGU */

I've also hadn't read immediately...
_________________
Get Xplora!
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat Jun 27, 2009 3:31 am    Post subject: Reply with quote

Right... that was in the B2 makefile... the CFLAGS has -DDANZEFF_SCEGU as one of the CFLAGS.
Back to top
View user's profile Send private message AIM Address
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Sat Jun 27, 2009 3:44 am    Post subject: Reply with quote

I firstly commented out DANZEFF_SDL:
Quote:


C:\pspdev\projects\GPOS>make
psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall -c danzeff.c -o danzeff.o

In file included from danzeff.h:20,
from danzeff.c:1:
pspctrl_emu.h(4) : column 21 : error: SDL/SDL.h: No such file or directory
In file included from danzeff.h:20,
from danzeff.c:1:
pspctrl_emu.h(70) : error: syntax error before '*' token
In file included from danzeff.c:1:
danzeff.h(63) : column 27 : error: SDL/SDL_image.h: No such file or directory
In file included from danzeff.c:1:
danzeff.h(65) : error: syntax error before '*' token
danzeff.c(188) : error: syntax error before '*' token
danzeff.c(188) : warning: type defaults to 'int' in declaration of 'keyBits'
danzeff.c(188) : warning: data definition has no type or storage class
danzeff.c(193) : error: syntax error before '*' token
danzeff.c(193) : warning: type defaults to 'int' in declaration of 'danzeff_scre
en'
danzeff.c(193) : warning: data definition has no type or storage class
danzeff.c(194) : error: syntax error before 'danzeff_screen_rect'
danzeff.c(194) : warning: type defaults to 'int' in declaration of 'danzeff_scre
en_rect'
danzeff.c(194) : warning: data definition has no type or storage class
danzeff.c(195) : error: syntax error before '*' token
danzeff.c : In function 'danzef_set_screen':
danzeff.c(197) : error: 'screen' undeclared (first use in this function)
danzeff.c(197) : error: (Each undeclared identifier is reported only once
danzeff.c(197) : error: for each function it appears in.)
danzeff.c(198) : error: request for member 'x' in something not a structure or u
nion
danzeff.c(199) : error: request for member 'y' in something not a structure or u
nion
danzeff.c(200) : error: request for member 'h' in something not a structure or u
nion
danzeff.c(201) : error: request for member 'w' in something not a structure or u
nion
danzeff.c : At top level:
danzeff.c(208) : error: syntax error before '*' token
danzeff.c : In function 'surface_draw_offset':
danzeff.c(211) : error: request for member 'x' in something not a structure or u
nion
danzeff.c(211) : error: 'screenX' undeclared (first use in this function)
danzeff.c(212) : error: request for member 'y' in something not a structure or u
nion
danzeff.c(212) : error: 'screenY' undeclared (first use in this function)
danzeff.c(215) : error: 'SDL_Rect' undeclared (first use in this function)
danzeff.c(215) : error: syntax error before 'pixels_rect'
danzeff.c(216) : error: 'pixels_rect' undeclared (first use in this function)
danzeff.c(216) : error: 'offsetX' undeclared (first use in this function)
danzeff.c(217) : error: 'offsetY' undeclared (first use in this function)
danzeff.c(218) : error: 'intWidth' undeclared (first use in this function)
danzeff.c(219) : error: 'intHeight' undeclared (first use in this function)
danzeff.c(221) : warning: implicit declaration of function 'SDL_BlitSurface'
danzeff.c(221) : error: 'pixels' undeclared (first use in this function)
danzeff.c : At top level:
danzeff.c(225) : error: syntax error before '*' token
danzeff.c : In function 'surface_draw':
danzeff.c(227) : error: 'pixels' undeclared (first use in this function)
danzeff.c : In function 'danzeff_load':
danzeff.c(238) : warning: implicit declaration of function 'IMG_Load'
danzeff.c(238) : warning: assignment makes pointer from integer without a cast
danzeff.c(239) : error: 'NULL' undeclared (first use in this function)
danzeff.c(246) : warning: implicit declaration of function 'SDL_FreeSurface'
danzeff.c : In function 'danzeff_free':
danzeff.c(265) : error: 'NULL' undeclared (first use in this function)
danzeff.c : In function 'danzeff_render':
danzeff.c(273) : warning: implicit declaration of function 'printf'
danzeff.c(273) : warning: incompatible implicit declaration of built-in function
'printf'
make: *** [danzeff.o] Error 1


Then I tried the SCEGU one:
Quote:


C:\pspdev\projects\GPOS>make
psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall -c danzeff.c -o danzeff.o

danzeff.c(8) : column 17 : error: png.h: No such file or directory
danzeff.c(370) : error: syntax error before 'png_ptr'
danzeff.c : In function 'danzeff_get_png_image_size':
danzeff.c(378) : error: 'png_structp' undeclared (first use in this function)
danzeff.c(378) : error: (Each undeclared identifier is reported only once
danzeff.c(378) : error: for each function it appears in.)
danzeff.c(378) : error: syntax error before 'png_ptr'
danzeff.c(379) : error: 'png_infop' undeclared (first use in this function)
danzeff.c(381) : error: 'png_uint_32' undeclared (first use in this function)
danzeff.c(381) : error: syntax error before 'width'
danzeff.c(383) : error: 'FILE' undeclared (first use in this function)
danzeff.c(383) : error: 'fp' undeclared (first use in this function)
danzeff.c(385) : warning: implicit declaration of function 'fopen'
danzeff.c(386) : error: 'png_ptr' undeclared (first use in this function)
danzeff.c(386) : warning: implicit declaration of function 'png_create_read_stru
ct'
danzeff.c(386) : error: 'PNG_LIBPNG_VER_STRING' undeclared (first use in this fu
nction)
danzeff.c(388) : warning: implicit declaration of function 'fclose'
danzeff.c(391) : warning: implicit declaration of function 'png_set_error_fn'
danzeff.c(391) : error: 'png_voidp' undeclared (first use in this function)
danzeff.c(391) : error: 'png_error_ptr' undeclared (first use in this function)
danzeff.c(392) : error: 'info_ptr' undeclared (first use in this function)
danzeff.c(392) : warning: implicit declaration of function 'png_create_info_stru
ct'
danzeff.c(395) : warning: implicit declaration of function 'png_destroy_read_str
uct'
danzeff.c(395) : error: 'png_infopp_NULL' undeclared (first use in this function
)
danzeff.c(398) : warning: implicit declaration of function 'png_init_io'
danzeff.c(399) : warning: implicit declaration of function 'png_set_sig_bytes'
danzeff.c(400) : warning: implicit declaration of function 'png_read_info'
danzeff.c(401) : warning: implicit declaration of function 'png_get_IHDR'
danzeff.c(401) : error: 'width' undeclared (first use in this function)
danzeff.c(401) : error: 'height' undeclared (first use in this function)
danzeff.c(401) : error: 'int_p_NULL' undeclared (first use in this function)
danzeff.c : In function 'danzeff_load_png_image':
danzeff.c(414) : error: 'png_structp' undeclared (first use in this function)
danzeff.c(414) : error: syntax error before 'png_ptr'
danzeff.c(415) : error: 'png_infop' undeclared (first use in this function)
danzeff.c(417) : error: 'png_uint_32' undeclared (first use in this function)
danzeff.c(417) : error: syntax error before 'width'
danzeff.c(421) : error: 'FILE' undeclared (first use in this function)
danzeff.c(421) : error: 'fp' undeclared (first use in this function)
danzeff.c(424) : error: 'png_ptr' undeclared (first use in this function)
danzeff.c(424) : error: 'PNG_LIBPNG_VER_STRING' undeclared (first use in this fu
nction)
danzeff.c(429) : error: 'png_voidp' undeclared (first use in this function)
danzeff.c(429) : error: 'png_error_ptr' undeclared (first use in this function)
danzeff.c(430) : error: 'info_ptr' undeclared (first use in this function)
danzeff.c(433) : error: 'png_infopp_NULL' undeclared (first use in this function
)
danzeff.c(439) : error: 'width' undeclared (first use in this function)
danzeff.c(439) : error: 'height' undeclared (first use in this function)
danzeff.c(439) : error: 'int_p_NULL' undeclared (first use in this function)
danzeff.c(440) : warning: implicit declaration of function 'png_set_strip_16'
danzeff.c(441) : warning: implicit declaration of function 'png_set_packing'
danzeff.c(442) : error: 'PNG_COLOR_TYPE_PALETTE' undeclared (first use in this f
unction)
danzeff.c(442) : warning: implicit declaration of function 'png_set_palette_to_r
gb'
danzeff.c(443) : error: 'PNG_COLOR_TYPE_GRAY' undeclared (first use in this func
tion)
danzeff.c(443) : warning: implicit declaration of function 'png_set_gray_1_2_4_t
o_8'
danzeff.c(444) : warning: implicit declaration of function 'png_get_valid'
danzeff.c(444) : error: 'PNG_INFO_tRNS' undeclared (first use in this function)
danzeff.c(444) : warning: implicit declaration of function 'png_set_tRNS_to_alph
a'
danzeff.c(445) : warning: implicit declaration of function 'png_set_filler'
danzeff.c(445) : error: 'PNG_FILLER_AFTER' undeclared (first use in this functio
n)
danzeff.c(454) : warning: implicit declaration of function 'png_read_row'
danzeff.c(454) : error: 'png_bytep_NULL' undeclared (first use in this function)

danzeff.c(461) : warning: implicit declaration of function 'png_read_end'
make: *** [danzeff.o] Error 1


Most likely the main cause of most the errors is that I'm missing a file or two. And tbh, commenting all the ifdefs is just the same as un-commeting one of the #define lines.

Any other ideas?

Oh, J.F.:
Danzeff.c: http://producted.pastebin.com/m57798f3
Danzeff.h: http://producted.pastebin.com/m3084adb
_________________
Producted.net
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat Jun 27, 2009 6:53 am    Post subject: Reply with quote

Your danzeff files look okay.

Solve your errors with the missing libpng first. I'd say you don't have the PSP libraries installed, just the toolchain.
Back to top
View user's profile Send private message AIM Address
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Mon Jun 29, 2009 4:13 am    Post subject: Reply with quote

Where can I find the libraries?
_________________
Producted.net
Back to top
View user's profile Send private message
ITDemo



Joined: 17 Nov 2007
Posts: 20

PostPosted: Mon Jun 29, 2009 4:59 am    Post subject: Reply with quote

The SVN...
Type ths into the terminal...

Code:
cd ..
svn checkout svn://svn.pspdev.org/psp/trunk/libpng
cd libpng
make
make install
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Jun 29, 2009 5:03 am    Post subject: Reply with quote

ITDemo wrote:
The SVN...
Type ths into the terminal...

Code:
cd ..
svn checkout svn://svn.pspdev.org/psp/trunk/libpng
cd libpng
make
make install


No. Wrong way to get the libraries.

Code:
svn co svn://svn.ps2dev.org/psp/trunk/psplibraries
cd psplibraries
./libraries.sh


If you're not going to use one of Heimdall's pre-built packages, at least read one of the tutorials! Here's one for Ubuntu based on a few threads found here (it can be used for most linux distros):
http://www.guztech.nl/tutorials/38-psp/49-setting-up-the-psptoolchain
Back to top
View user's profile Send private message AIM Address
ITDemo



Joined: 17 Nov 2007
Posts: 20

PostPosted: Mon Jun 29, 2009 5:07 am    Post subject: Reply with quote

Oh sorry I thought he just wanted the png library...
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Jun 29, 2009 12:32 pm    Post subject: Reply with quote

If he's missing png, he's probably missing them all. :)
Back to top
View user's profile Send private message AIM Address
ITDemo



Joined: 17 Nov 2007
Posts: 20

PostPosted: Mon Jun 29, 2009 1:02 pm    Post subject: Reply with quote

Haha oh yeah... I knew that :)
Back to top
View user's profile Send private message
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Mon Jun 29, 2009 3:22 pm    Post subject: Reply with quote

I checked out the /psplibraries dir on my desktop (used a client instead of the terminal). Now where do I need to move them to? ./psp/sdk/lib ?
_________________
Producted.net
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Tue Jun 30, 2009 1:29 am    Post subject: Reply with quote

Producted wrote:
I checked out the /psplibraries dir on my desktop (used a client instead of the terminal). Now where do I need to move them to? ./psp/sdk/lib ?


That doesn't have any libraries in it. It's a script to BUILD the libraries. Please read the tutorial and just follow the directions.
Back to top
View user's profile Send private message AIM Address
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Tue Jun 30, 2009 4:01 pm    Post subject: Reply with quote

Quote:

[..]
So here is my guide to installing the psptoolchain and psplibraries on Linux.
[..]


I'm running Windows XP SP 3...
_________________
Producted.net
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Wed Jul 01, 2009 1:47 am    Post subject: Reply with quote

Producted wrote:
Quote:

[..]
So here is my guide to installing the psptoolchain and psplibraries on Linux.
[..]


I'm running Windows XP SP 3...


So use Heimdall's pre-built toolchain and library packages for Windows.
Back to top
View user's profile Send private message AIM Address
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Wed Jul 01, 2009 2:50 am    Post subject: Reply with quote

Thanks for the tip J.F.
This is my new console output:
Quote:


C:\pspdev\projects\GPOS>make
psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=500 -L/
SDK/lib -L. -LC:/pspdev/psp/sdk/lib -specs=C:/pspdev/psp/sdk/lib/prxspecs -Wl,-q
,-TC:/pspdev/psp/sdk/lib/linkfile.prx main.o danzeff.o C:/pspdev/psp/sdk/lib/p
rxexports.o -lpsprtc -lpspwlan -lpspgum -lpspgu -lpspaudio -lm -lpsppower -lpspd
ebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet
_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o GPOS.elf
danzeff.o: In function `danzeff_get_png_image_size':
danzeff.c:(.text+0x3b8): undefined reference to `png_create_read_struct'
danzeff.c:(.text+0x3d8): undefined reference to `png_set_error_fn'
danzeff.c:(.text+0x3e0): undefined reference to `png_create_info_struct'
danzeff.c:(.text+0x3f4): undefined reference to `png_init_io'
danzeff.c:(.text+0x400): undefined reference to `png_set_sig_bytes'
danzeff.c:(.text+0x40c): undefined reference to `png_read_info'
danzeff.c:(.text+0x434): undefined reference to `png_get_IHDR'
danzeff.c:(.text+0x444): undefined reference to `png_destroy_read_struct'
danzeff.c:(.text+0x4bc): undefined reference to `png_destroy_read_struct'
danzeff.o: In function `danzeff_load_png_image':
danzeff.c:(.text+0x50c): undefined reference to `png_create_read_struct'
danzeff.c:(.text+0x52c): undefined reference to `png_set_error_fn'
danzeff.c:(.text+0x534): undefined reference to `png_create_info_struct'
danzeff.c:(.text+0x548): undefined reference to `png_init_io'
danzeff.c:(.text+0x554): undefined reference to `png_set_sig_bytes'
danzeff.c:(.text+0x560): undefined reference to `png_read_info'
danzeff.c:(.text+0x588): undefined reference to `png_get_IHDR'
danzeff.c:(.text+0x590): undefined reference to `png_set_strip_16'
danzeff.c:(.text+0x598): undefined reference to `png_set_packing'
danzeff.c:(.text+0x5c0): undefined reference to `png_get_valid'
danzeff.c:(.text+0x5d8): undefined reference to `png_set_filler'
danzeff.c:(.text+0x608): undefined reference to `png_read_row'
danzeff.c:(.text+0x66c): undefined reference to `png_read_end'
danzeff.c:(.text+0x67c): undefined reference to `png_destroy_read_struct'
danzeff.c:(.text+0x6b8): undefined reference to `png_set_gray_1_2_4_to_8'
danzeff.c:(.text+0x6c8): undefined reference to `png_get_valid'
danzeff.c:(.text+0x6d8): undefined reference to `png_set_tRNS_to_alpha'
danzeff.c:(.text+0x710): undefined reference to `png_set_palette_to_rgb'
danzeff.c:(.text+0x73c): undefined reference to `png_destroy_read_struct'
collect2: ld returned 1 exit status
make: *** [GPOS.elf] Error 1


This makes me asume that I'm still missing the png lib?


EDIT: I added -lpng to the makefile. Now I'm getting this:
Quote:


C:\pspdev\projects\GPOS>make
psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=500 -L/
SDK/lib -L. -LC:/pspdev/psp/sdk/lib -specs=C:/pspdev/psp/sdk/lib/prxspecs -Wl,-q
,-TC:/pspdev/psp/sdk/lib/linkfile.prx main.o danzeff.o C:/pspdev/psp/sdk/lib/p
rxexports.o -lpsprtc -lpspwlan -lpspgum -lpspgu -lpspaudio -lm -lpsppower -lpng
-lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -l
pspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o GPOS.elf
c:/pspdev/bin/../lib/gcc/psp/4.3.3/../../../../psp/lib\libpng.a(png.o): In funct
ion `png_reset_zstream':
png.c:(.text+0x8c): undefined reference to `inflateReset'
c:/pspdev/bin/../lib/gcc/psp/4.3.3/../../../../psp/lib\libpng.a(png.o): In funct
ion `png_calculate_crc':
png.c:(.text+0xa60): undefined reference to `crc32'
c:/pspdev/bin/../lib/gcc/psp/4.3.3/../../../../psp/lib\libpng.a(png.o): In funct
ion `png_reset_crc':
png.c:(.text+0xab0): undefined reference to `crc32'
c:/pspdev/bin/../lib/gcc/psp/4.3.3/../../../../psp/lib\libpng.a(pngread.o): In f
unction `png_read_destroy':
pngread.c:(.text+0x1fc): undefined reference to `inflateEnd'
c:/pspdev/bin/../lib/gcc/psp/4.3.3/../../../../psp/lib\libpng.a(pngread.o): In f
unction `png_read_row':
pngread.c:(.text+0xa90): undefined reference to `inflate'
pngread.c:(.text+0xb94): undefined reference to `inflate'
c:/pspdev/bin/../lib/gcc/psp/4.3.3/../../../../psp/lib\libpng.a(pngread.o): In f
unction `png_read_init_3':
pngread.c:(.text+0x1ca0): undefined reference to `inflateInit_'
c:/pspdev/bin/../lib/gcc/psp/4.3.3/../../../../psp/lib\libpng.a(pngread.o): In f
unction `png_create_read_struct_2':
pngread.c:(.text+0x2124): undefined reference to `inflateInit_'
c:/pspdev/bin/../lib/gcc/psp/4.3.3/../../../../psp/lib\libpng.a(pngrtran.o): In
function `png_build_gamma_table':
pngrtran.c:(.text+0x2b64): undefined reference to `pow'
pngrtran.c:(.text+0x2c4c): undefined reference to `pow'
pngrtran.c:(.text+0x2d50): undefined reference to `pow'
pngrtran.c:(.text+0x2f8c): undefined reference to `pow'
pngrtran.c:(.text+0x3114): undefined reference to `pow'
c:/pspdev/bin/../lib/gcc/psp/4.3.3/../../../../psp/lib\libpng.a(pngrtran.o):pngr
tran.c:(.text+0x32a8): more undefined references to `pow' follow
c:/pspdev/bin/../lib/gcc/psp/4.3.3/../../../../psp/lib\libpng.a(pngrutil.o): In
function `png_decompress_chunk':
pngrutil.c:(.text+0x11c8): undefined reference to `inflate'
pngrutil.c:(.text+0x12d4): undefined reference to `inflateReset'
pngrutil.c:(.text+0x141c): undefined reference to `inflateReset'
c:/pspdev/bin/../lib/gcc/psp/4.3.3/../../../../psp/lib\libpng.a(pngrutil.o): In
function `png_read_finish_row':
pngrutil.c:(.text+0x17d8): undefined reference to `inflateReset'
pngrutil.c:(.text+0x1848): undefined reference to `inflate'
collect2: ld returned 1 exit status
make: *** [GPOS.elf] Error 1

_________________
Producted.net
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group