SDL_ttf ?


Masen

Member
Joined
Dec 29, 2005
Messages
205
kann ich das irgendwie nutzen ??? bzw. wie kann ich sachen die das brauchen compilen ???
 
but from where i get the lib ??? in my include folder the SDL_ttf.h doesnt exist ...
 
sorry but i dont understand it from this topic ... i think at first i need a new SDL lib where SDL_ttf.h is included ... or im wrong ??? and then have do i have to change something in my make ??? my current looks so :

Code:
<i>
</i>CROSS_COMPILE = C:/devkitGP2X/bin/arm-linux-
SDL_BASE = C:/devkitGP2X/bin/arm-linux-
LDFLAGS = -static

CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
STRIP = $(CROSS_COMPILE)strip

CFLAGS = `$(SDL_BASE)sdl-config --cflags` -O2 -Wall 
CXXFLAGS = `$(SDL_BASE)sdl-config --cflags` -O2 -Wall
LIBS = `$(SDL_BASE)sdl-config --libs`

SDLTEST_TARGET = *.gpe
SDLTEST_OBJS = *.o

all : $(SDLTEST_TARGET)

$(SDLTEST_TARGET) : $(SDLTEST_OBJS)
	$(CXX) $(LDFLAGS) -o $(SDLTEST_TARGET) $(SDLTEST_OBJS) $(LIBS)
	$(STRIP) $(SDLTEST_TARGET)

clean:
	rm -f $(ALL_TARGETS) *.o *~
 
so i got the sdl_ttf.h and put it in the include/SDL/ ... and i got libSDLttf.a and libSDLttf.la and put it in lib/ ... but it still doesnt work ...
 
"It doesn't work" is not enough.. Better include the errors/warnings you get, even with those we might not be able to solve it, but this way we'd just be guessing ;)
 
Wir warten immernoch auf die Fehlermeldungen ;)

Eigentlich hast du es richtig gemacht: include bei die Includes, libs bei die libs und fertig ist es. an der sdl-config musst du nix ändern
 
ehmmm ich brauch aber erstmal vernüftige Dateien ... ich glaub nicht das die fürn GP2X waren ... wo kann ich denn die neuste lib runter laden ??? dann könnte ich ja einfach den include und lib ordner updaten ...
 
nimm die: http://portal.tharos-online.de/media/SDL_ttf-2.0.7_ARM.zip
Einfach in den devkitarm ordner entpacken
 
danke ^^


aba es läuft immer noch nicht ...
Code:
<i>
</i>C:/devkitGP2X/bin/arm-linux-g++ -static -o ***.gpe gui.o  `C:/devkitGP2X/bin/arm-linux-sdl-config --libs`
gui.o: In function `MyEmuGUI::MyEmuGUI()':
gui.cpp:(.text+0x26c): undefined reference to `TTF_Init'
gui.cpp:(.text+0x284): undefined reference to `TTF_OpenFont'
gui.o: In function `MyEmuGUI::MyEmuGUI()':
gui.cpp:(.text+0x374): undefined reference to `TTF_Init'
gui.cpp:(.text+0x38c): undefined reference to `TTF_OpenFont'
gui.o: In function `MyEmuGUI::DrawText(unsigned int, unsigned int, std::string)':
gui.cpp:(.text+0x4ec): undefined reference to `TTF_RenderText_Solid'
gui.cpp:(.text+0x504): undefined reference to `TTF_RenderText_Shaded'
gui.cpp:(.text+0x518): undefined reference to `TTF_RenderText_Blended'
make: *** [***.gpe] Error 1

denke das es an der make datei liegt ... ist immer noch die selbe wie oben ...
 
ok
entweder adde mal -lSDL_ttf zu deinen LIBS im makefile
Automatisch mach sdl_config das nich
 
Masen said:
danke ^^


Code:
<i>
</i>C:/devkitGP2X/bin/arm-linux-g++ -static -o ***.gpe gui.o  `C:/devkitGP2X/bin/arm-linux-sdl-config --libs`
gui.o: In function `MyEmuGUI::MyEmuGUI()':
gui.cpp:(.text+0x26c): undefined reference to `TTF_Init'
...

check output of the C:/devkitGP2X/bin/arm-linux-sdl-config --libs
command. The 'backticks' mean "dear shell, please execute what is between these, and replace the whole sequence with whatever comes out of standard output"

You want the line to read something like: gcc -static -o secretemuproject.gpe gui.o main.o -L/path/to/libs/ -lSDLmain -lSDL_ttf -lfreetype -lz -lm -lSDL -lpthread

so if the sdl-config script is not giving you that, modify your makefile...

P.
 
Code:
<i>
</i>C:/devkitGP2X/bin/arm-linux-g++ -static -o ***.gpe gui.o  `C:/devkitGP2X/bin/arm-linux-sdl-config --libs` -lSDL_ttf
C:/devkitGP2X/lib\libSDL_ttf.a(SDL_ttf.o): In function `TTF_Init':
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:213: undefined reference to `FT_Init_FreeType'
C:/devkitGP2X/lib\libSDL_ttf.a(SDL_ttf.o): In function `Find_Glyph':
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:435: undefined reference to `FT_Load_Glyph'
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:501: undefined reference to `FT_Render_Glyph'
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:433: undefined reference to `FT_Get_Char_Index'
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:503: undefined reference to `FT_Render_Glyph'
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:496: undefined reference to `FT_Outline_Transform'
C:/devkitGP2X/lib\libSDL_ttf.a(SDL_ttf.o): In function `TTF_CloseFont':
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:663: undefined reference to `FT_Done_Face'
C:/devkitGP2X/lib\libSDL_ttf.a(SDL_ttf.o): In function `TTF_OpenFontIndexRW':
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:289: undefined reference to `FT_Open_Face'
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:325: undefined reference to `FT_Set_Pixel_Sizes'
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:301: undefined reference to `FT_Set_Char_Size'
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:310: undefined reference to `FT_MulFix'
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:311: undefined reference to `FT_MulFix'
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:313: undefined reference to `FT_MulFix'
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:314: undefined reference to `FT_MulFix'
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:315: undefined reference to `FT_MulFix'
C:/devkitGP2X/lib\libSDL_ttf.a(SDL_ttf.o): In function `TTF_OpenFontIndex':
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:372: undefined reference to `SDL_RWFromFile'
C:/devkitGP2X/lib\libSDL_ttf.a(SDL_ttf.o): In function `TTF_Quit':
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:1740: undefined reference to `FT_Done_FreeType'
C:/devkitGP2X/lib\libSDL_ttf.a(SDL_ttf.o): In function `TTF_SizeUNICODE':
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:895: undefined reference to `FT_Get_Kerning'
C:/devkitGP2X/lib\libSDL_ttf.a(SDL_ttf.o): In function `TTF_RenderUNICODE_Blended':
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:1613: undefined reference to `FT_Get_Kerning'
C:/devkitGP2X/lib\libSDL_ttf.a(SDL_ttf.o): In function `TTF_RenderUNICODE_Solid':
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:1103: undefined reference to `FT_Get_Kerning'
C:/devkitGP2X/lib\libSDL_ttf.a(SDL_ttf.o): In function `TTF_RenderUNICODE_Shaded':
C:\gp2x\SDL_ttf-2.0.7/SDL_ttf.c:1364: undefined reference to `FT_Get_Kerning'
make: *** [***.gpe] Error 1

da scheint wohl noch ne datei zu fehlen ...
 
Code:
<i>
</i>c:\devkitgp2x\bin\..\lib\gcc\arm-linux\4.0.2\..\..\..\..\arm-linux\bin\ld.exe: cannot find -lfreetype
 
Masen said:
Code:
<i>
</i>c:\devkitgp2x\bin\..\lib\gcc\arm-linux\4.0.2\..\..\..\..\arm-linux\bin\ld.exe: cannot find -lfreetype

please include the invocation so I can check if it's correct. And make sure you have libfreetype.a in your lib directory..

P.
 
Back
Top