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 

Help with PgeFont Please

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



Joined: 29 Mar 2008
Posts: 4

PostPosted: Sat Mar 29, 2008 8:10 am    Post subject: Help with PgeFont Please Reply with quote

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:

$ 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:25:10: error: #include expects "FILENAME" or <FILENAME>
../../pgeFont.c: In function 'pgeFontLoad':
../../pgeFont.c:102: error: 'FT_Library' undeclared (first use in this function)

../../pgeFont.c:102: error: (Each undeclared identifier is reported only once
../../pgeFont.c:102: error: for each function it appears in.)
../../pgeFont.c:102: error: expected ';' before 'library'
../../pgeFont.c:103: error: 'FT_Face' undeclared (first use in this function)
../../pgeFont.c:103: error: expected ';' before 'face'
../../pgeFont.c:105: warning: implicit declaration of function 'FT_Init_FreeType
'
../../pgeFont.c:105: error: 'library' undeclared (first use in this function)
../../pgeFont.c:108: warning: implicit declaration of function 'FT_New_Face'
../../pgeFont.c:108: error: 'face' undeclared (first use in this function)
../../pgeFont.c:111: error: 'FT_GlyphSlot' undeclared (first use in this functio
n)
../../pgeFont.c:111: error: expected ';' before 'slot'
../../pgeFont.c:132: warning: implicit declaration of function 'FT_Set_Pixel_Siz
es'
../../pgeFont.c:140: warning: implicit declaration of function 'FT_Set_Char_Size
'
../../pgeFont.c:147: error: 'slot' undeclared (first use in this function)
../../pgeFont.c:151: warning: implicit declaration of function 'FT_Load_Char'
../../pgeFont.c:151: error: 'FT_LOAD_RENDER' undeclared (first use in this funct
ion)
../../pgeFont.c:263: warning: implicit declaration of function 'FT_Done_Face'
../../pgeFont.c:264: warning: implicit declaration of function 'FT_Done_FreeType
'
make: *** [../../pgeFont.o] Error 1


Can anyone please help me get this to work or point me in the direction of a good PgeFont tutorial.

Many thanks!
Back to top
View user's profile Send private message
Insert_witty_name



Joined: 10 May 2006
Posts: 376

PostPosted: Sat Mar 29, 2008 8:24 am    Post subject: Reply with quote

Hi, try using this as your Makefile instead.

Code:
PSPDEV=$(shell psp-config --psp-prefix)

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

INCDIR =
CFLAGS = -O2 -G0 -Wall -g
CFLAGS += $(shell $(PSPDEV)/bin/freetype-config --cflags)
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LDFLAGS =
LIBS = -lpspgum -lpspgu -lpng -lz -lm
LIBS += $(shell $(PSPDEV)/bin/freetype-config --libs)

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Font Sample

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


Last edited by Insert_witty_name on Sat Mar 29, 2008 8:49 am; edited 1 time in total
Back to top
View user's profile Send private message
irishlostfan



Joined: 29 Mar 2008
Posts: 4

PostPosted: Sat Mar 29, 2008 8:30 am    Post subject: Reply with quote

Thanks for your help but now i get this

Code:

$ 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: In function `pgeFontLoad':
../../pgeFont.c:105: undefined reference to `FT_Init_FreeType'
../../pgeFont.c:108: undefined reference to `FT_New_Face'
../../pgeFont.c:132: undefined reference to `FT_Set_Pixel_Sizes'
../../pgeFont.c:151: undefined reference to `FT_Load_Char'
../../pgeFont.c:200: undefined reference to `FT_Load_Char'
../../pgeFont.c:263: undefined reference to `FT_Done_Face'
../../pgeFont.c:264: undefined reference to `FT_Done_FreeType'
../../pgeFont.c:140: undefined reference to `FT_Set_Char_Size'
collect2: ld returned 1 exit status
make: *** [fonttest.elf] Error 1
Back to top
View user's profile Send private message
Insert_witty_name



Joined: 10 May 2006
Posts: 376

PostPosted: Sat Mar 29, 2008 8:49 am    Post subject: Reply with quote

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

Should work fine now.
Back to top
View user's profile Send private message
irishlostfan



Joined: 29 Mar 2008
Posts: 4

PostPosted: Sat Mar 29, 2008 8:55 am    Post subject: Reply with quote

Ok, we are getting closer.
Code:

$ 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: could not read symbols: Archive has no
index; run ranlib to add one
collect2: ld returned 1 exit status
make: *** [fonttest.elf] Error 1


Thanks again.
Back to top
View user's profile Send private message
Insert_witty_name



Joined: 10 May 2006
Posts: 376

PostPosted: Sat Mar 29, 2008 9:02 am    Post subject: Reply with quote

Reinstall freetype.

Ensure you read the README.PSP for install instructions.
Back to top
View user's profile Send private message
irishlostfan



Joined: 29 Mar 2008
Posts: 4

PostPosted: Sat Mar 29, 2008 9:48 am    Post subject: Reply with quote

Success!!

You are a legend!

Thanks again.
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