Hi,
ich hab folgendes Problem: Ich hab mir für mein neues Spiel(Arbeitsname RollingSphere) eine Methode zum Rendern von Textabschnitten geschrieben:
|
C-/C++-Quelltext
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
//Methode zum Rendern eines zusmmenhängenden Textes
tbResult CMainMenu::RenderText(char** ppText, //Text
tbColor* pColor, //Farben
tbVector2 vPosition, //Startposition(oben links)
int iLength) //Anzahl der Zeilen
{
g_pRollingSphere->m_pFont->Begin(); //Text beginnen
for(int i = 0; i < iLength; i++) if(g_pRollingSphere->m_pFont->DrawText //Zeile für Zeile zeichnen
(vPosition + tbVector2(0.0f, 0.05f * (float) i), //Position berechnen
ppText[i], //der Text
TB_FF_ALIGN_HCENTER | //Optionen
TB_FF_ALIGN_VCENTER | //...
TB_FF_RELATIVE | //...
TB_FF_RELATIVESCALING, -1, //...
pColor[i])) //Farbe
{
TB_ERROR("Fehler beim rendern des Textes.", TB_ERROR);
}
g_pRollingSphere->m_pFont->End(); //Szene beenden
return TB_OK;
}
|
dabei ist g_pBreakanoid in einer Quelldatei definiert und in der Haupt-Headerdatei bekanntgegeben(
|
C-/C++-Quelltext
|
1
|
extern CRollingSphere* g_pRollingSphere;
|
)
Wenn ich das Projekt jetzt aber kompilieren will bekomme ich 2 Fehlermeldungen:
|
Quellcode
|
1
|
Fehler 1 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: enum tbResult __thiscall tbFont::DrawTextW(class tbVector2,char const *,unsigned long,int,class tbColor const &,class tbColor &,class tbVector2,float,float,float,float,float)" (__imp_?DrawTextW@tbFont@@QAE?AW4tbResult@@VtbVector2@@PBDKHABVtbColor@@AAV4@0MMMMM@Z)" in Funktion ""private: enum tbResult __thiscall CMainMenu::RenderText(char * *,class tbColor *,class tbVector2,int)" (?RenderText@CMainMenu@@AAE?AW4tbResult@@PAPADPAVtbColor@@VtbVector2@@H@Z)". MainMenu.obj
|
und
|
Quellcode
|
1
|
Fehler 2 fatal error LNK1120: 1 nicht aufgelöste externe Verweise. C:\Dokumente und Einstellungen\Titus\Eigene Dateien\Visual Studio 2008\Projects\RollingSphere\RollingSphere\Debug\RollingSphere.exe 1
|
Ich weiß nicht, was ich falsch gemacht habe, da die Begin()- und End()-Aufrufe funktionieren.
Danke schon mal im Voraus
Titus