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 

Problem with fonts

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



Joined: 14 Oct 2007
Posts: 17

PostPosted: Mon Oct 15, 2007 11:36 pm    Post subject: Problem with fonts Reply with quote

Hey
I want to use custom fonts on my homebrew apps.
So I downloaded pgeFont and tried to compile the sample, but cygwin gave me an error:

Code:

$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -G0 -Wall -O2 -D_PSP_FW_VERSION=
150  -L. -L/usr/local/pspdev/psp/sdk/lib   flibtest.o flib.o graphics.o framebuf
fer.o -lpsppower -lpspgu -lpng -lz -lm -lfreetype -lpspdebug -lpspdisplay -lpspg
e -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver
 -lpsputility -lpspuser -lpspkernel -o flibtest.elf
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/bin/ld: cannot find -lfreety
pe
collect2: ld returned 1 exit status
make: *** [flibtest.elf] Error 1


Then I found this thread and downloaded the file from http://www.cheatsync.net/flib.rar because someone said it's the easiest way to use fonts.
Again, i tried to compile the example and again, i got the same error...

I guess something called "lfreetype" is missing^^
Does someone of you guys here know how to solve my problem?

Sorry for my bad English
Thx for your help

DAan
Back to top
View user's profile Send private message
CpuWhiz



Joined: 04 Jun 2007
Posts: 42

PostPosted: Tue Oct 16, 2007 3:11 am    Post subject: Reply with quote

That's freetype, a font rendering library. -l is the library linking switch and freetype is the name of the library. You need to checkout a copy of freetype from svn://svn.pspdev.org/psp/trunk/freetype and then read the README.PSP file:
Code:
svn co svn://svn.pspdev.org/psp/trunk/freetype


Alternatively you can run the psptoolchain script to get freetype and a lot of other useful libraries in one go:
Code:
svn co svn://svn.pspdev.org/psp/trunk/psplibraries
cd psplibraries
./libraries.sh
Back to top
View user's profile Send private message
DAanDASja



Joined: 14 Oct 2007
Posts: 17

PostPosted: Tue Oct 16, 2007 4:55 am    Post subject: Reply with quote

When i type
Code:

svn co svn://svn.pspdev.org/psp/trunk/freetype


this message appears:
Code:

$ svn co svn://svn.pspdev.org/psp/trunk/freetype
svn: 'freetype' is already a working copy for a different URL; run 'svn update'
to complete it
Back to top
View user's profile Send private message
DAanDASja



Joined: 14 Oct 2007
Posts: 17

PostPosted: Fri Oct 19, 2007 5:58 am    Post subject: Reply with quote

Ok, new problem... Don't know what to do :(

Code:

$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -D_PSP_FW_VERSI
ON=150  -L. -L/usr/local/pspdev/psp/sdk/lib   fonttest.o graphics.o framebuffer.
o pgeFont.o -lpspgum -lpspgu -lpng -lz -lfreetype -lm -lpspdebug -lpspdisplay -l
pspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_reso
lver -lpsputility -lpspuser -lpspkernel -o fonttest.elf
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libfreetype.a: could not
 read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status
make: *** [fonttest.elf] Error 1


What should I do?
Back to top
View user's profile Send private message
CpuWhiz



Joined: 04 Jun 2007
Posts: 42

PostPosted: Fri Oct 19, 2007 7:13 am    Post subject: Reply with quote

Try running ranlib:
Code:
psp-ranlib /usr/local/pspdev/psp/lib/libfreetype.a
Back to top
View user's profile Send private message
_.-noel-._



Joined: 13 Aug 2007
Posts: 49

PostPosted: Fri Oct 19, 2007 7:38 am    Post subject: Reply with quote

servus

i help you tomorrow over icq...

doesnt it work with tty_sdl ?

now something else in german to him:

thx für die BIN datei...jetzt hat sich mein anderer thread gelöst...und der mit dem i/o auch ^^...

ich helf dir morgen weida...

ich bin um 6 on
_________________
Sry for my english
Back to top
View user's profile Send private message
DAanDASja



Joined: 14 Oct 2007
Posts: 17

PostPosted: Fri Oct 19, 2007 10:19 pm    Post subject: Reply with quote

CpuWhiz wrote:
Try running ranlib:
Code:
psp-ranlib /usr/local/pspdev/psp/lib/libfreetype.a


Didn't work :(
Still get the same error...
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat Oct 20, 2007 3:19 am    Post subject: Reply with quote

My guess is you built it, but not for psp. Checkout psplibraries, not freetype. Then run the libraries.sh script. That will build all the major libraries properly for the PSP, including freetype.
Back to top
View user's profile Send private message AIM Address
DAanDASja



Joined: 14 Oct 2007
Posts: 17

PostPosted: Sat Oct 20, 2007 12:23 pm    Post subject: Reply with quote

J.F. wrote:
My guess is you built it, but not for psp. Checkout psplibraries, not freetype. Then run the libraries.sh script. That will build all the major libraries properly for the PSP, including freetype.


Wow, thanks dude... It finally works!
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