 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
vulcan
Joined: 14 Jul 2007 Posts: 3 Location: Geneva, Switzerland
|
Posted: Sun Jul 05, 2009 6:30 am Post subject: FreeType2 compile-time errors. [solved] |
|
|
I recently restarted a project I put on hold for about a year and I'm having problems compiling part of the code that uses the FreeType2 library posted here. The code compiled flawlessly with a previous version of the SDK (about a year old...), but I get a linking error with a recent update (26/06/09) of the SDK. Unfortunately I did not keep a copy of the older SDK.
I recompiled the FreeType2 library against the newer SDK without any problems, but the problem still persists. It seems that using the FT_Init_FreeType( ... ) function causes the error that I can't seem to fix.
For simplicity, this code reproduces the same error. FT_New_Face( ... ) is included to show that the rest of the program compiles "fine" but the FT_Init_FreeType( ... ) causes an error, and is hopefully the only one that does so. Could anyone with the FreeType2 library test this out for me and see if it compiles?
| Code: |
#include <ft2build.h>
#include FT_FREETYPE_H
int main( int argc, char **argv )
{
FT_Library ft2Library;
FT_Face ft2Face;
// Comment this and voila... no compile-time error :-$
FT_Init_FreeType( &ft2Library );
// Source parameter is left NULL intentionally.
FT_New_Face( ft2Library, NULL, 0, &ft2Face );
return 0;
}
|
Makefile:
| Code: |
EE_BIN = freetype.elf
EE_OBJS = main.o
EE_INCS += -I ./include -I $(PS2DEV)/.. -I $(PS2SDK)/ports/include
EE_LDFLAGS = -L $(PS2DEV)/.. -L $(PS2SDK)/ports/lib -L $(PS2SDK)/ee/lib
EE_CFLAGS += -fno-builtin-printf -Wall
EE_LIBS = -lfreetype -lkernel -lc -lgcc
all: $(EE_BIN)
clean:
@rm -f $(EE_BIN) $(EE_OBJS)
include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal
|
Error:
/usr/local/ps2dev/ps2sdk/ports/lib/libfreetype.a(type1cid.o)(.text+0x12d4):src/cid/cidload.c:332: undefined reference to `_ctype_'
/usr/local/ps2dev/ps2sdk/ports/lib/libfreetype.a(type1cid.o)(.text+0x12d8):src/cid/cidload.c:332: undefined reference to `_ctype_'
/usr/local/ps2dev/ps2sdk/ports/lib/libfreetype.a(type1.o)(.text+0x7d8):src/type1/t1afm.c:115: undefined reference to `_ctype_'
/usr/local/ps2dev/ps2sdk/ports/lib/libfreetype.a(type1.o)(.text+0x2c10):src/type1/t1afm.c:66: undefined reference to `_ctype_'
/usr/local/ps2dev/ps2sdk/ports/lib/libfreetype.a(type1.o)(.text+0x7dc):src/type1/t1afm.c:115: undefined reference to `_ctype_'
/usr/local/ps2dev/ps2sdk/ports/lib/libfreetype.a(type1.o)(.text+0x828):src/type1/t1afm.c:124: more undefined references to `_ctype_' follow
/usr/local/ps2dev/ps2sdk/ports/lib/libfreetype.a(type42.o)(.text+0x2078):src/type42/t42drivr.c:96: undefined reference to `atoi'
collect2: ld returned 1 exit status
make: *** [freetype.elf] Error 1
Additional info:
OS: Debian GNU/Linux squeeze/sid
libfreetype is installed under:
/usr/local/ps2dev/ps2sdk/ports/include/freetype/
/usr/local/ps2dev/ps2sdk/ports/include/ft2build.h
/usr/local/ps2dev/ps2sdk/ports/libfreetype.a
Last edited by vulcan on Sun Jul 26, 2009 2:24 am; edited 1 time in total |
|
| Back to top |
|
 |
Mega Man
Joined: 18 Jun 2005 Posts: 274
|
Posted: Mon Jul 06, 2009 12:38 am Post subject: |
|
|
| I suggest to use ps2sdk-ports/freetype from SVN. |
|
| Back to top |
|
 |
vulcan
Joined: 14 Jul 2007 Posts: 3 Location: Geneva, Switzerland
|
Posted: Mon Jul 06, 2009 7:33 am Post subject: |
|
|
| Perfect! The code snippet compiled! I can't believe I did not look through the SVN. Thanks a lot Mega Man! Now let's hope everything else works fine :-) |
|
| Back to top |
|
 |
|
|
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
|