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 

PSPGL - Compiled lib ok, demos not so much[Solved]

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Fri Jul 07, 2006 4:57 pm    Post subject: PSPGL - Compiled lib ok, demos not so much[Solved] Reply with quote

I succesfully downloaded and maked the library without any problems, but when making the demos I get the following error,

Code:

C:\pspdev\pspgl\tests>make
mkdir .deps
convert firefox.png rgba:firefox.raw
Invalid Parameter - rgba:firefox.raw
make: *** [firefox.raw] Error 4


I removed the rule that invokes convert and then I was greeted with,

Code:

C:\pspdev\pspgl\tests>make
make: *** No rule to make target `firefox.o', needed by `bezier.elf'.  Stop.


Which I assume is because convert never run, but I don't know really. Anyone else run into these problems? ( I can compile pspsdk demos fine )


Last edited by Kojima on Fri Jul 07, 2006 7:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Fri Jul 07, 2006 5:11 pm    Post subject: Reply with quote

http://forums.ps2dev.org/viewtopic.php?t=5479

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Fri Jul 07, 2006 5:14 pm    Post subject: Reply with quote

Thanks, I'll have another stab at Cyngwin.
-edit- Do you know how to manually download the package you mentioned in that thread?
(Sorry for the dumb questions, but I've never used cyngwin before other than for about 20 mins a year or so back)

Does anyone know of a reason why cygwin would omit most of it's dev tools btw? I recall it taking an hour or so to install before, but now it takes under 10 mins and doesn't install vital tools like cc1.
Back to top
View user's profile Send private message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Fri Jul 07, 2006 5:46 pm    Post subject: Reply with quote

Got it working by directly linking to the imageshack convert, but now there's a bunch of new errors,

Code:

C:\pspdev\pspgl\tests>make
C:\convert firefox.png rgba:firefox.raw
(sym=`echo firefox | tr '-' '_'`; \
 echo -e ".data\n.global ${sym}_start\n${sym}_start:\n\t.incbin \"firefox.raw\""
 | psp-as -o firefox.o)
psp-gcc -std=gnu99 -fsingle-precision-constant -g -Wall -O2 -MD -MF .deps/bezier
.d -I.. -IC:/pspdev/psp/sdk/include -c bezier.c
psp-gcc -std=gnu99 -fsingle-precision-constant -g -Wall -O2 -MD -MF .deps/perfme
ter.d -I.. -IC:/pspdev/psp/sdk/include -c perfmeter.c
psp-gcc -std=gnu99 -fsingle-precision-constant -g -Wall -O2 -MD -MF .deps/screen
shot.d -I.. -IC:/pspdev/psp/sdk/include -c screenshot.c
screenshot.c(5) : column 17 :  error: png.h: No such file or directory
screenshot.c : In function 'writepng':
screenshot.c(13) : error: 'png_structp' undeclared (first use in this function)
screenshot.c(13) : error: (Each undeclared identifier is reported only once
screenshot.c(13) : error: for each function it appears in.)
screenshot.c(13) : error: syntax error before 'png_ptr'
screenshot.c(14) : error: 'png_infop' undeclared (first use in this function)
screenshot.c(17) : error: 'png_ptr' undeclared (first use in this function)
screenshot.c(17) : warning: implicit declaration of function 'png_create_write_s
truct'
screenshot.c(17) : error: 'PNG_LIBPNG_VER_STRING' undeclared (first use in this
function)
screenshot.c(20) : error: 'info_ptr' undeclared (first use in this function)
screenshot.c(20) : warning: implicit declaration of function 'png_create_info_st
ruct'
screenshot.c(24) : warning: implicit declaration of function 'png_init_io'
screenshot.c(25) : warning: implicit declaration of function 'png_set_IHDR'
screenshot.c(26) : error: 'PNG_COLOR_TYPE_RGB_ALPHA' undeclared (first use in th
is function)
screenshot.c(26) : error: 'PNG_INTERLACE_NONE' undeclared (first use in this fun
ction)
screenshot.c(27) : error: 'PNG_COMPRESSION_TYPE_DEFAULT' undeclared (first use i
n this function)
screenshot.c(27) : error: 'PNG_FILTER_TYPE_DEFAULT' undeclared (first use in thi
s function)
screenshot.c(32) : warning: implicit declaration of function 'png_set_rows'
screenshot.c(32) : error: 'png_byte' undeclared (first use in this function)
screenshot.c(32) : error: syntax error before ')' token
screenshot.c(33) : warning: implicit declaration of function 'png_write_png'
screenshot.c(33) : error: 'PNG_TRANSFORM_IDENTITY' undeclared (first use in this
 function)
screenshot.c(34) : warning: implicit declaration of function 'png_write_end'
screenshot.c(37) : warning: implicit declaration of function 'png_destroy_write_
struct'
screenshot.c(37) : error: 'png_infopp' undeclared (first use in this function)
make: *** [screenshot.o] Error 1
rm bezier.o firefox.raw perfmeter.o



considering it was only one file, I removed it and remaked, this time I get,

Code:


C:\pspdev\pspgl\tests>make
make: *** No rule to make target `depthtest.elf', needed by `all'.  Stop.


Any ideas?
Back to top
View user's profile Send private message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Fri Jul 07, 2006 7:41 pm    Post subject: Reply with quote

Got it compiled ago in the end.

For anyone else running into trouble with it, it's because you need zlib and libpng installed before hand.
I couldn't get libpng installed(Wouldn't compile out of the box, and I didn't feel like trying to fix it) so I just removed the screenshot code from the demos and voila, it all worked.
Back to top
View user's profile Send private message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Fri Jul 07, 2006 7:45 pm    Post subject: Reply with quote

-Edited- Never mind, I just used the converted nehe tutorials as a base, they work perfectly.
Back to top
View user's profile Send private message
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Fri Jul 07, 2006 9:58 pm    Post subject: Reply with quote

Kojima wrote:
-Edited- Never mind, I just used the converted nehe tutorials as a base, they work perfectly.


Yes, they are a great help!
Back to top
View user's profile Send private message
zilt



Joined: 21 Feb 2006
Posts: 45
Location: Ontario, Canada

PostPosted: Fri Jul 07, 2006 9:59 pm    Post subject: Reply with quote

Kojima wrote:
I couldn't get libpng installed(Wouldn't compile out of the box, and I didn't feel like trying to fix it)


I guess you're not using the libpng and zlib from svn.ps2dev.org. They both work.
Back to top
View user's profile Send private message Visit poster's website
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Fri Jul 07, 2006 10:03 pm    Post subject: Reply with quote

zilt wrote:
Kojima wrote:
I couldn't get libpng installed(Wouldn't compile out of the box, and I didn't feel like trying to fix it)


I guess you're not using the libpng and zlib from svn.ps2dev.org. They both work.


It is sometimes hard to know which library needs which other library, and in what order you need to install them. For instance libpng needs zlib installed first, and i think also another library.
Back to top
View user's profile Send private message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Fri Jul 07, 2006 10:10 pm    Post subject: Reply with quote

I did grab them both from the svn, but libpng wouldn't compile.
zlib compiled fine first time.

In fact, libpng is the only lib I ever downloaded from ps2dev's svn that hasn't worked, so I guess it's just as arwin says a missing library, but I wasn't in the mood to figure out which one.
Back to top
View user's profile Send private message
zilt



Joined: 21 Feb 2006
Posts: 45
Location: Ontario, Canada

PostPosted: Fri Jul 07, 2006 10:41 pm    Post subject: Reply with quote

Kojima wrote:
but I wasn't in the mood to figure out which one.


Did you bother to read the libpng README.PSP file? From the readme:

Quote:
Requirements:

zlib
Back to top
View user's profile Send private message Visit poster's website
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Fri Jul 07, 2006 11:31 pm    Post subject: Reply with quote

No I didn't.

Got another problem now, everything generally is working, but there's one function that can't be linked for some reason.

undefined reference to `gluOrtho2D'

I'm linking to lglu so I don't think it's that. Any ideas?
Back to top
View user's profile Send private message
zilt



Joined: 21 Feb 2006
Posts: 45
Location: Ontario, Canada

PostPosted: Fri Jul 07, 2006 11:43 pm    Post subject: Reply with quote

From looking at the pspgl source, gluOrtho2D doesn't appear to be implemented. Use glOrtho() instead. Here's my method for setting up 2D space for the gui:

Code:
void pspRenderer::setup2D()
{
   GLCHK(glViewport( 0, 0, 480, 272 ));
   GLCHK(glMatrixMode( GL_PROJECTION ));
   GLCHK(glLoadIdentity());
   
   GLCHK(glOrtho(0.0, 480.0, 0.0, 272.0, -2.0, 2.0 ));
   GLCHK(glMatrixMode( GL_MODELVIEW ));
   GLCHK(glLoadIdentity());
}
Back to top
View user's profile Send private message Visit poster's website
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Sat Jul 08, 2006 12:13 am    Post subject: Reply with quote

Thanks Z, I'll give it a go. Glad it's possible, really want to lock down the 2d parts of my engine 'fore going 3d.
Back to top
View user's profile Send private message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Sat Jul 08, 2006 1:55 am    Post subject: Reply with quote

-edit- fixed it, was just a rouge function call that was screwing up the projection matrix.
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
Page 1 of 1

 
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