Help with PgeFont Please

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

Moderators: cheriff, TyRaNiD

Post Reply
irishlostfan
Posts: 4
Joined: Sat Mar 29, 2008 8:04 am

Help with PgeFont Please

Post by irishlostfan »

I am trying to use PgeFont but I cant get it to work, I Have installed Freetype I think(maybe incorrectly, I'm a total noob!). Anyways this is what i get when i try to compile the samples.

Code: Select all

$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -D_PSP_FW_VERSI
ON=150   -c -o fonttest.o fonttest.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -D_PSP_FW_VERSI
ON=150   -c -o graphics.o graphics.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -D_PSP_FW_VERSI
ON=150   -c -o framebuffer.o framebuffer.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -D_PSP_FW_VERSI
ON=150   -c -o ../../pgeFont.o ../../pgeFont.c
In file included from ../../pgeFont.c:24:
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/include/ft2build.h:56:38: er
ror: freetype/config/ftheader.h: No such file or directory
../../pgeFont.c&#58;25&#58;10&#58; error&#58; #include expects "FILENAME" or <FILENAME>
../../pgeFont.c&#58; In function 'pgeFontLoad'&#58;
../../pgeFont.c&#58;102&#58; error&#58; 'FT_Library' undeclared &#40;first use in this function&#41;

../../pgeFont.c&#58;102&#58; error&#58; &#40;Each undeclared identifier is reported only once
../../pgeFont.c&#58;102&#58; error&#58; for each function it appears in.&#41;
../../pgeFont.c&#58;102&#58; error&#58; expected ';' before 'library'
../../pgeFont.c&#58;103&#58; error&#58; 'FT_Face' undeclared &#40;first use in this function&#41;
../../pgeFont.c&#58;103&#58; error&#58; expected ';' before 'face'
../../pgeFont.c&#58;105&#58; warning&#58; implicit declaration of function 'FT_Init_FreeType
'
../../pgeFont.c&#58;105&#58; error&#58; 'library' undeclared &#40;first use in this function&#41;
../../pgeFont.c&#58;108&#58; warning&#58; implicit declaration of function 'FT_New_Face'
../../pgeFont.c&#58;108&#58; error&#58; 'face' undeclared &#40;first use in this function&#41;
../../pgeFont.c&#58;111&#58; error&#58; 'FT_GlyphSlot' undeclared &#40;first use in this functio
n&#41;
../../pgeFont.c&#58;111&#58; error&#58; expected ';' before 'slot'
../../pgeFont.c&#58;132&#58; warning&#58; implicit declaration of function 'FT_Set_Pixel_Siz
es'
../../pgeFont.c&#58;140&#58; warning&#58; implicit declaration of function 'FT_Set_Char_Size
'
../../pgeFont.c&#58;147&#58; error&#58; 'slot' undeclared &#40;first use in this function&#41;
../../pgeFont.c&#58;151&#58; warning&#58; implicit declaration of function 'FT_Load_Char'
../../pgeFont.c&#58;151&#58; error&#58; 'FT_LOAD_RENDER' undeclared &#40;first use in this funct
ion&#41;
../../pgeFont.c&#58;263&#58; warning&#58; implicit declaration of function 'FT_Done_Face'
../../pgeFont.c&#58;264&#58; warning&#58; implicit declaration of function 'FT_Done_FreeType
'
make&#58; *** &#91;../../pgeFont.o&#93; Error 1
Can anyone please help me get this to work or point me in the direction of a good PgeFont tutorial.

Many thanks!
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Hi, try using this as your Makefile instead.

Code: Select all

PSPDEV=$&#40;shell psp-config --psp-prefix&#41;

TARGET = fonttest
OBJS = fonttest.o graphics.o framebuffer.o ../../pgeFont.o

INCDIR =
CFLAGS = -O2 -G0 -Wall -g
CFLAGS += $&#40;shell $&#40;PSPDEV&#41;/bin/freetype-config --cflags&#41;
CXXFLAGS = $&#40;CFLAGS&#41; -fno-exceptions -fno-rtti
ASFLAGS = $&#40;CFLAGS&#41;

LIBDIR =
LDFLAGS = 
LIBS = -lpspgum -lpspgu -lpng -lz -lm
LIBS += $&#40;shell $&#40;PSPDEV&#41;/bin/freetype-config --libs&#41;

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Font Sample

PSPSDK=$&#40;shell psp-config --pspsdk-path&#41;
include $&#40;PSPSDK&#41;/lib/build.mak
Last edited by Insert_witty_name on Sat Mar 29, 2008 8:49 am, edited 1 time in total.
irishlostfan
Posts: 4
Joined: Sat Mar 29, 2008 8:04 am

Post by irishlostfan »

Thanks for your help but now i get this

Code: Select all

$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -I/usr/local/in
clude/freetype2 -I/usr/local/include -D_PSP_FW_VERSION=150   -c -o fonttest.o fo
nttest.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -I/usr/local/in
clude/freetype2 -I/usr/local/include -D_PSP_FW_VERSION=150   -c -o graphics.o gr
aphics.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -I/usr/local/in
clude/freetype2 -I/usr/local/include -D_PSP_FW_VERSION=150   -c -o framebuffer.o
 framebuffer.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -I/usr/local/in
clude/freetype2 -I/usr/local/include -D_PSP_FW_VERSION=150   -c -o ../../pgeFont
.o ../../pgeFont.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -I/usr/local/in
clude/freetype2 -I/usr/local/include -D_PSP_FW_VERSION=150  -L. -L/usr/local/psp
dev/psp/sdk/lib   fonttest.o graphics.o framebuffer.o ../../pgeFont.o -lpspgum -
lpspgu -lpng -lz -lm -L/usr/local/lib -L/usr/local/lib -lfreetype -lz -lpspdebug
 -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apc
tl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o fonttest.elf
../../pgeFont.o&#58; In function `pgeFontLoad'&#58;
../../pgeFont.c&#58;105&#58; undefined reference to `FT_Init_FreeType'
../../pgeFont.c&#58;108&#58; undefined reference to `FT_New_Face'
../../pgeFont.c&#58;132&#58; undefined reference to `FT_Set_Pixel_Sizes'
../../pgeFont.c&#58;151&#58; undefined reference to `FT_Load_Char'
../../pgeFont.c&#58;200&#58; undefined reference to `FT_Load_Char'
../../pgeFont.c&#58;263&#58; undefined reference to `FT_Done_Face'
../../pgeFont.c&#58;264&#58; undefined reference to `FT_Done_FreeType'
../../pgeFont.c&#58;140&#58; undefined reference to `FT_Set_Char_Size'
collect2&#58; ld returned 1 exit status
make&#58; *** &#91;fonttest.elf&#93; Error 1
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

I've updated my previous post with a new Makefile.

Should work fine now.
irishlostfan
Posts: 4
Joined: Sat Mar 29, 2008 8:04 am

Post by irishlostfan »

Ok, we are getting closer.

Code: Select all

$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -I/usr/local/ps
pdev/psp/include/freetype2 -I/usr/local/pspdev/psp/include -D_PSP_FW_VERSION=150
   -c -o fonttest.o fonttest.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -I/usr/local/ps
pdev/psp/include/freetype2 -I/usr/local/pspdev/psp/include -D_PSP_FW_VERSION=150
   -c -o graphics.o graphics.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -I/usr/local/ps
pdev/psp/include/freetype2 -I/usr/local/pspdev/psp/include -D_PSP_FW_VERSION=150
   -c -o framebuffer.o framebuffer.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -I/usr/local/ps
pdev/psp/include/freetype2 -I/usr/local/pspdev/psp/include -D_PSP_FW_VERSION=150
   -c -o ../../pgeFont.o ../../pgeFont.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -I/usr/local/ps
pdev/psp/include/freetype2 -I/usr/local/pspdev/psp/include -D_PSP_FW_VERSION=150
  -L. -L/usr/local/pspdev/psp/sdk/lib   fonttest.o graphics.o framebuffer.o ../.
./pgeFont.o -lpspgum -lpspgu -lpng -lz -lm -L/usr/local/pspdev/psp/lib -lfreetyp
e -lz -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_i
net -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o fontt
est.elf
/usr/local/pspdev/psp/lib/libfreetype.a&#58; could not read symbols&#58; Archive has no
index; run ranlib to add one
collect2&#58; ld returned 1 exit status
make&#58; *** &#91;fonttest.elf&#93; Error 1
Thanks again.
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Reinstall freetype.

Ensure you read the README.PSP for install instructions.
irishlostfan
Posts: 4
Joined: Sat Mar 29, 2008 8:04 am

Post by irishlostfan »

Success!!

You are a legend!

Thanks again.
Post Reply