Problem with fonts

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
DAanDASja
Posts: 17
Joined: Sun Oct 14, 2007 8:58 am

Problem with fonts

Post by DAanDASja »

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: Select all

$ 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
CpuWhiz
Posts: 42
Joined: Mon Jun 04, 2007 1:30 am

Post by CpuWhiz »

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: Select all

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: Select all

svn co svn://svn.pspdev.org/psp/trunk/psplibraries
cd psplibraries
./libraries.sh
DAanDASja
Posts: 17
Joined: Sun Oct 14, 2007 8:58 am

Post by DAanDASja »

When i type

Code: Select all

svn co svn://svn.pspdev.org/psp/trunk/freetype
this message appears:

Code: Select all

$ 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
DAanDASja
Posts: 17
Joined: Sun Oct 14, 2007 8:58 am

Post by DAanDASja »

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

Code: Select all

$ 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?
CpuWhiz
Posts: 42
Joined: Mon Jun 04, 2007 1:30 am

Post by CpuWhiz »

Try running ranlib:

Code: Select all

psp-ranlib /usr/local/pspdev/psp/lib/libfreetype.a
_.-noel-._
Posts: 49
Joined: Mon Aug 13, 2007 12:57 am

Post by _.-noel-._ »

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
DAanDASja
Posts: 17
Joined: Sun Oct 14, 2007 8:58 am

Post by DAanDASja »

CpuWhiz wrote:Try running ranlib:

Code: Select all

psp-ranlib /usr/local/pspdev/psp/lib/libfreetype.a
Didn't work :(
Still get the same error...
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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.
DAanDASja
Posts: 17
Joined: Sun Oct 14, 2007 8:58 am

Post by DAanDASja »

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