Du bist nicht angemeldet.

Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!

Werbeanzeige

1

26.07.2003, 18:47

Engine kaputt oder dicker Fehler? - Grundgerüst -

Hallo,

ich möchte gerade mein erstes Spiel programmieren (missile 3D). Dabei sitze ich (seit 3 Tagen) an dem Gundgerüst. Und immer funktioniert es nicht.

Nun habe ich versucht, wenigenstens einen kleinen Anfang zu haben. (Move, Render, tbConfig...). Dabei habe ich das Grundgerüst von BREAKANOID genommen. Und dabei scheitert dabei auch. Mehr als 100 Fehler...

Dabei mehr als 80 mal der gleiche Fehler. Ist vielleicht die Engine kaputt? Oder mein Compiler?

Ich weiß, es nicht die feine Art, den ganzen Quellcode ins Internet zu stellen, aber finde nicht den Fehler!

Danke und Grüße,

Chrissi


PS:

Ich habe das Spiel GS_GAME und die Sounds rausgenommen, da ich sie erst einbaue, wenn ich alles das Grundgerüst fertig habe.

die missile.h-Datei:

Quellcode

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
    MISSILE 3D
    =-=-=-=-=-

  Änderung an dieser Datei:
        27.7.2003 (Christopher Schmidt)



  -> Die Grundfunktionen
*/

#include <TriBase.h>
#include "intro.h"
#include "resource.h"

// Spielzustände
enum EGameState {
    GS_NONE,        // Kein Spielzustand
    GS_INTRO,       // Intro
    GS_MAIN_MENU    // Hauptmenü
};

// Die Spiel-Klasse
class CMissile
{
public:
    // Variablen
    // DirectX
    tbConfig                m_Config;       // Konfiguration
    PDIRECT3DSTATEBLOCK9    m_pStateBlock;  // Statusblock für Direct3D
    tbTextureManager*       m_pTexManager;  // Texturmanager

    // Die Spielzustände
    CIntro*                 m_pIntro;       // Intro
//  CMainMenu*              m_pMainMenu;    // Hauptmenü
    EGameState              m_GameState;    // Aktueller Spielzustand
    float                   m_fTime;        // Stoppuhr

    // Schriftarten
    tbFont*                 m_pFont1;       // Schriftart 1
    tbFont*                 m_pFont2;       // Schriftart 2

    // Methoden
    tbResult Init();                                // Initialisiert das Spiel komplett
    tbResult Exit();                                // Fährt das Spiel herunter
    tbResult Load();                                // Lädt die Spieldaten
    tbResult Unload();                              // Entlädt die Spieldaten
    tbResult Run();                                 // Lässt das Spiel laufen
    tbResult SetGameState(EGameState NewGameState); // Setzt einen neuen Spielzustand
    tbResult Move(float fTime);                     // Bewegt das Spiel
    tbResult Render(float fTime);                   // Rendert das Spiel
};

// Globale Variablen
extern CMissile*    g_pMissile;
extern float*       g_pfButtons;
extern BOOL*        g_pbButtons;
extern BOOL*        g_pbButtons;



die missile.cpp-Datei:

Quellcode

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
/*
    MISSILE 3D
    =-=-=-=-=-

  Änderung an dieser Datei:
        27.7.2003 (Christopher Schmidt)



  -> Die Grundfunktionen
*/

// Include-Dateien

#include "missile.h"

// Globale Variablen
CMissile* g_pMissile = NULL;
float* g_pfButtons = NULL;
BOOL* g_pbButtons = NULL;

// Windows-Hauptfunktion
int WINAPI WinMain(HINSTANCE hInstance,
                   HINSTANCE hPrevInstance,
                   char* pcCommandLine,
                   int iShowCommand)
{
    tbResult r;

    // Spiel initialisieren
    g_pMissile = new CMissile;
    r = g_pMissile->Init();
    if(r == TB_CANCELED)
    {
        // Der Konfigurationsdialog wurde abgebrochen!
        // Das Programm "leise" verlassen.
        TB_SAFE_DELETE(g_pMissile);
        return 0;
    }
    else if(r)
    {
        g_pMissile->Exit();
        TB_SAFE_DELETE(g_pMissile);
        MessageBox(NULL, "Fehler beim Initialisieren des Spiels!",
                   "Fehler", MB_OK | MB_ICONEXCLAMATION);
        return 1;
    }

    // Spiel laufen lassen
    if(g_pMissile->Run())
    {
        g_pMissile->Exit();
        TB_SAFE_DELETE(g_pMissile);
        MessageBox(NULL, "Fehler im Spiel!",
                   "Fehler", MB_OK | MB_ICONEXCLAMATION);
        return 1;
    }

    // Spiel verlassen
    g_pMissile->Exit();
    TB_SAFE_DELETE(g_pMissile);

    return 0;
}


// Lädt das Spiel
tbResult CMissile::Load()
{

    // Direct3D initialisieren
    if(tbDirect3D::Init(&m_Config, "Missile",
                        NULL, LoadIcon(GetModuleHandle(NULL),
                        MAKEINTRESOURCE(IDI_ICON1))))
    {
        // Fehler!
        TB_ERROR("Fehler beim Initialisieren von Direct3D!", TB_ERROR);
    }

    // Statusblock für Direct3D erstellen
    tbDirect3D::GetDevice()->CreateStateBlock(D3DSBT_ALL, &m_pStateBlock);

    // Texturmanager erstellen
    if(tbTextureManager::Init())
    {
        // Fehler!
        TB_ERROR("Texturmanager konnte nicht initialisiert werden!", TB_ERROR);
    }

    // DirectInput initialisieren
    if(tbDirectInput::Init())
    {
        // Fehler!
        TB_ERROR("DirectInput konnte nicht initialisiert werden!", TB_ERROR);
    }

    // Speicher für die analogen Knöpfe reservieren
    g_pfButtons = new float[tbDirectInput::GetNumButtons()];
    g_pbButtons = new BOOL[tbDirectInput::GetNumButtons()];

    // Schriftarten laden
    m_pFont1 = new tbFont;
    if(m_pFont1->Init("Data\\Font1.tga", "Data\\Font1.tbf"))
    {
        // Fehler!
        TB_ERROR("Fehler beim Laden der Schriftart Data\\Font1!", TB_ERROR);
    }

    m_pFont2 = new tbFont;
    if(m_pFont2->Init("Data\\Font2.tga", "Data\\Font2.tbf"))
    {
        // Fehler!
        TB_ERROR("Fehler beim Laden der Schriftart Data\\Font2!", TB_ERROR);
    }

    return TB_OK;
}

// Setzt einen neuen Spielzustand
tbResult CMissile::SetGameState(EGameState NewGameState)
{
    tbResult r = TB_OK;

    // Alten Spielzustand entladen
    switch(m_GameState)
    {
    case GS_INTRO:      m_pIntro->Exit();           break;
    // case GS_MAIN_MENU:   m_pMainMenu->Exit();        break;
    }

    // Zeit zurücksetzen
    m_fTime = 0.0f;

    // Neuen Spielzustand laden
    m_GameState = NewGameState;
    switch(m_GameState)
    {
    case GS_INTRO:      r = m_pIntro->Init();       break;
    // case GS_MAIN_MENU:   r = m_pMainMenu->Init();    break;
    }

    // Eventuelle Fehler abfangen
    if(r) TB_ERROR("Fehler beim Laden des Spielzustands!", TB_ERROR);

    return TB_OK;
}

// Initialisiert das Spiel komplett
tbResult CMissile::Init()
{
    tbResult r;

    // Alles zurücksetzen
    ZeroMemory(this, sizeof(CMissile));

    // Die TriBase-Engine initialisieren und den Konfigurationsdialog aufrufen
    if(tbInit()) return TB_ERROR;
    r = tbDoConfigDialog(&m_Config);
    if(r == TB_CANCELED) return TB_CANCELED;
    else if(r) TB_ERROR("Engine konnte nicht initialisiert werden!", r);

    // Laden...
    if(Load()) TB_ERROR("Fehler beim Laden des Spiels!", TB_ERROR);

    // Klassen für alle Spielzustände erstellen
    m_pIntro = new CIntro;
    // m_pMainMenu = new CMainMenu;

    // Wir beginnen beim Intro!
    SetGameState(GS_INTRO);

    return TB_OK;
}

// Bewegt das Spiel
tbResult CMissile::Move(float fTime)
{
    tbResult r = TB_OK;

    // Eingabegeräte abfragen
    tbDirectInput::GetState(g_pfButtons, g_pbButtons);

    // Aktuellen Spielzustand bewegen
    switch(m_GameState)
    {
    case GS_INTRO:      r = m_pIntro->Move(fTime);      break;
    // case GS_MAIN_MENU:   r = m_pMainMenu->Move(fTime);   break;
    }

    // Eventuelle Fehler abfangen
    if(r) TB_ERROR("Fehler beim Bewegen des Spielzustands!", TB_ERROR);

    // Zeit addieren
    m_fTime += fTime;

    return TB_OK;
}

// Rendert das Spiel
tbResult CMissile::Render(float fTime)
{
    tbResult r = TB_OK;

    // Aktuellen Spielzustand rendern
    switch(m_GameState)
    {
    case GS_INTRO:      r = m_pIntro->Render(fTime);    break;
    // case GS_MAIN_MENU:   r = m_pMainMenu->Render(fTime); break;
    }

    // Eventuelle Fehler abfangen
    if(r) TB_ERROR("Fehler beim Rendern des Spielzustands!", TB_ERROR);

    // Bildpuffer anzeigen
    if(tbDirect3D::Present())
    {
        // Anzeigen ist fehlgeschlagen!
        // Wahrscheinlich läuft das Programm im Vollbildmodus und es
        // wurde zwischenzeitlich minimiert.
        // Wir initialisieren das Spiel komplett neu.

        // Aktuellen Spielzustand entladen
        switch(m_GameState)
        {
        case GS_INTRO:      m_pIntro->Unload();     break;
        // case GS_MAIN_MENU:   m_pMainMenu->Unload();  break;
        }

        // Das ganze Spiel entladen und dann wieder neu laden
        Unload();
        Load();

        // Aktuellen Spielstatus neu laden
        switch(m_GameState)
        {
        case GS_INTRO:      m_pIntro->Load();       break;
        // case GS_MAIN_MENU:   m_pMainMenu->Load();    break;
        }
    }

    return TB_OK;
}

// Move- und Render-Funktion (Kapselung)
tbResult Move(float fTime) {return g_pMissile->Move(fTime);}
tbResult Render(float fTime) {return g_pMissile->Render(fTime);}

// Lässt das Spiel laufen
tbResult CMissile::Run()
{
    // Nachrichtenschleife betreten
    if(tbDoMessageLoop(::Move, ::Render))
    {
        // Fehler!
        TB_ERROR("Fehler in der Nachrichtenschleife!", TB_ERROR);
    }

    return TB_OK;
}


die intro.h-Datei:

Quellcode

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
28
29
30
/*
    MISSILE 3D
    =-=-=-=-=-

  Änderung an dieser Datei:
        27.7.2003 (Christopher Schmidt)



  -> Das Intro
*/

// Klasse für das Intro
class CIntro
{
public:
    // Variablen
    PDIRECT3DTEXTURE9 m_pTitle; // Titelbild

    // Konstruktor
    inline CIntro() {ZeroMemory(this, sizeof(CIntro));}

    // Methoden
    tbResult Init();                // Initialisierung
    tbResult Exit();                // Herunterfahren
    tbResult Load();                // Laden
    tbResult Unload();              // Entladen
    tbResult Move(float fTime);     // Bewegen
    tbResult Render(float fTime);   // Rendern
};


die intro.cpp-Datei:

Quellcode

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
/*
    MISSILE 3D
    =-=-=-=-=-

  Änderung an dieser Datei:
        27.7.2003 (Christopher Schmidt)



  -> Das Intro
*/

#include "Missile.h"


// __________________________________________________________________
// Vertizes für das Titelbild
#define TITLE_FVF (D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1)
struct STitleVertex
{
    tbVector3   vPosition;
    float       fRHW;
    D3DCOLOR    Color;
    tbVector2   vTex0;
};

// Initialisiert den Spielzustand
tbResult CIntro::Init()
{
    // Laden...
    if(Load()) TB_ERROR("Fehler beim Laden des Spielzustands!", TB_ERROR);

    return TB_OK;
}

// Fährt den Spielzustand herunter
tbResult CIntro::Exit()
{
    // Entladen...
    Unload();

    return TB_OK;
}

// Lädt den Spielzustand
tbResult CIntro::Load()
{
    // Titelbild laden
    m_pTitle = tbTextureManager::GetTexture("Data\\Title.jpg");
    if(m_pTitle == NULL) TB_ERROR("Fehler beim Laden von Data\\Title.jpg!", TB_ERROR);

    return TB_OK;
}

// Entlädt den Spielzustand
tbResult CIntro::Unload()
{
    // Die Textur löschen
    g_pMissile->m_pTexManager->ReleaseTexture(m_pTitle);

    return TB_OK;
}

// Bewegt den Spielzustand
tbResult CIntro::Move(float fTime)
{
    // Wenn eine der typischen Tasten gedrückt wurde: zum Hauptmenü!
    if(g_pbButtons[TB_KEY_NUMPADENTER] ||
       g_pbButtons[TB_KEY_RETURN] ||
       g_pbButtons[TB_KEY_SPACE] ||
       g_pbButtons[TB_MOUSE_BUTTON(0)] ||
       g_pbButtons[TB_MOUSE_BUTTON(1)])
    {
        tbDelay(100);
        g_pMissile->SetGameState(GS_MAIN_MENU);
    }

    return TB_OK;
}

// Rendert den Spielzustand
tbResult CIntro::Render(float fTime)
{
    STitleVertex aVertex[4];


    // Puffer leeren und Szene beginnen
    tbDirect3D::Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER,
                      tbColor(0.0f, 0.0f, 0.0f), 1.0f, 0);
    tbDirect3D::BeginScene();

    // ------------------------------------------------------------------

    // Vertexformat und Titelbildtextur setzen, Z-Buffer aus
    tbDirect3D::SetFVF(TITLE_FVF);
    tbDirect3D::SetTexture(0, m_pTitle);
    tbDirect3D::SetRS(D3DRS_ZENABLE, D3DZB_FALSE);

    // Die vier Vertizes des Titelbilds erstellen (Rechteck)
    // Links unten
    aVertex[0].vPosition = tbVector3(0.0f, tbDirect3D::GetScreenSize().y, 0.5f);
    aVertex[0].fRHW = 1.0f;
    aVertex[0].Color = tbColor(1.0f, 0.8f, 0.8f);
    aVertex[0].vTex0 = tbVector2(0.0f, 1.0f);

    // Links oben
    aVertex[1].vPosition = tbVector3(0.0f, 0.0f, 0.0f);
    aVertex[1].fRHW = 1.0f;
    aVertex[1].Color = tbColor(0.8f, 1.0f, 0.8f);
    aVertex[1].vTex0 = tbVector2(0.0f, 0.0f);

    // Rechts unten
    aVertex[2].vPosition = tbVector3(tbDirect3D::GetScreenSize().x, tbDirect3D::GetScreenSize().y, 0.5f);
    aVertex[2].fRHW = 1.0f;
    aVertex[2].Color = tbColor(0.8f, 0.8f, 1.0f);
    aVertex[2].vTex0 = tbVector2(1.0f, 1.0f);

    // Rechts oben
    aVertex[3].vPosition = tbVector3(tbDirect3D::GetScreenSize().x, 0.0f, 0.5f);
    aVertex[3].fRHW = 1.0f;
    aVertex[3].Color = tbColor(1.0f, 1.0f, 0.8f);
    aVertex[3].vTex0 = tbVector2(1.0f, 0.0f);

    // Texturkoordinaten sinusförmig verschieben ("wabbeln")
    for(DWORD dwVertex = 0; dwVertex < 4; dwVertex++)
    {
        aVertex[dwVertex].vTex0.x += sinf(g_pMissile->m_fTime + (float)(dwVertex)) * 0.01f;
        aVertex[dwVertex].vTex0.y += cosf(g_pMissile->m_fTime + (float)(dwVertex)) * 0.01f;
    }

    // Als Dreiecksfolge zeichnen
    tbDirect3D::GetDevice()->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, aVertex, sizeof(STitleVertex));

    // ------------------------------------------------------------------

    // Kleinen Text anzeigen
    g_pMissile->m_pFont2->Begin();
    g_pMissile->m_pFont2->DrawText(tbVector2(0.5f, 0.7f), "Powered by TriBase", TB_FF_ALIGN_HCENTER | TB_FF_ALIGN_VCENTER | TB_FF_RELATIVE | TB_FF_RELATIVESCALING);
    g_pMissile->m_pFont2->DrawText(tbVector2(0.5f, 0.8f), "- Drücken Sie Enter -", TB_FF_ALIGN_HCENTER | TB_FF_ALIGN_VCENTER | TB_FF_RELATIVE | TB_FF_RELATIVESCALING);
    g_pMissile->m_pFont2->End();

    // ------------------------------------------------------------------

    // Szene beenden
    tbDirect3D::EndScene();

    return TB_OK;
}

Tracert

Treue Seele

Beiträge: 108

Wohnort: Braunschweig

Beruf: Student

  • Private Nachricht senden

2

26.07.2003, 21:03

Vielleicht solltest du dir die Fehlermeldungen mal genau anschauen: Es fehlen ; vor dem nächsten {!

Der erste Fehler dieser Art ist bei

Quellcode

1
2
3
4
5
enum EGameState { 
   GS_NONE,      // Kein Spielzustand 
   GS_INTRO,      // Intro 
   GS_MAIN_MENU,   // Hauptmenü 
}  //Hier fehlt das ';'-Zeichen!!!


Kann auch noch an mehreren anderen Stellen sein, habe aber nicht die Zeit den ganzen Code durchzugehen und außerdem ist das wohl deine Aufgabe. Mach das also am besten auch mal selber...

Damit hättest du schonmal den Großteil der Fehlermeldungen weg.

TR

3

26.07.2003, 21:43

Oh, danke.

Ich werde den Fehler gleich korrigieren.

Aber trotzdem, super Forum. Danke...




[edit]
jetzt funktioniert fast alles...

Der fehler war, dass ich vergesen habe, die Intro-Klasse/MainMenu-KLasse zu INCLUDIEREN.

Nur kommen jetzt ganz andere Fehler... (Ich habe die Main/Menu klasse ganz rausgenommen


Quellcode

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--------------------Konfiguration: Missile 3D - Win32 Debug--------------------
Linker-Vorgang läuft...
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) enum tbResult  __cdecl tbWriteToLog(char *,...)" (__imp_?tbWriteToLog@@YA?AW4tbResult@@PADZZ)
missile.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) enum tbResult  __cdecl tbWriteToLog(char *,...)" (__imp_?tbWriteToLog@@YA?AW4tbResult@@PADZZ)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) char * __cdecl tbRemoveDir(char *)" (__imp_?tbRemoveDir@@YAPADPAD@Z)
missile.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) char * __cdecl tbRemoveDir(char *)" (__imp_?tbRemoveDir@@YAPADPAD@Z)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static struct IDirect3DTexture9 * __cdecl tbTextureManager::GetTexture(char *,int,int,int,int,enum _D3DFORMAT,unsigned long,enum _D3DPOOL,unsigned long,unsig
ned long,unsigned long)" (__imp_?GetTexture@tbTextureManager@@SAPAUIDirect3DTexture9@@PADHHHHW4_D3DFORMAT@@KW4_D3DPOOL@@KKK@Z)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static enum tbResult  __cdecl tbTextureManager::ReleaseTexture(struct IDirect3DBaseTexture9 *)" (__imp_?ReleaseTexture@tbTextureManager@@SA?AW4tbResult@@PAUI
Direct3DBaseTexture9@@@Z)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) enum tbResult  __cdecl tbDelay(unsigned long)" (__imp_?tbDelay@@YA?AW4tbResult@@K@Z)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static enum tbResult  __cdecl tbDirect3D::EndScene(void)" (__imp_?EndScene@tbDirect3D@@SA?AW4tbResult@@XZ)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: enum tbResult  __thiscall tbFont::End(void)" (__imp_?End@tbFont@@QAE?AW4tbResult@@XZ)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: enum tbResult  __thiscall tbFont::DrawTextA(class tbVector2,char const *,unsigned long,int,class tbColor const &,class tbColor &,class tbVector2,float,float,
float,float,float)" (__imp_?DrawTextA@tbFont@@QAE?AW4tbResult@@VtbVector2@@PBDKHABVtbColor@@AAV4@0MMMMM@Z)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: __thiscall tbColor::tbColor(float)" (__imp_??0tbColor@@QAE@M@Z)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: __thiscall tbVector2::tbVector2(float)" (__imp_??0tbVector2@@QAE@M@Z)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: enum tbResult  __thiscall tbFont::Begin(void)" (__imp_?Begin@tbFont@@QAE?AW4tbResult@@XZ)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static struct IDirect3DDevice9 * __cdecl tbDirect3D::GetDevice(void)" (__imp_?GetDevice@tbDirect3D@@SAPAUIDirect3DDevice9@@XZ)
missile.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static struct IDirect3DDevice9 * __cdecl tbDirect3D::GetDevice(void)" (__imp_?GetDevice@tbDirect3D@@SAPAUIDirect3DDevice9@@XZ)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: class tbVector2  __thiscall tbVector2::operator=(class tbVector2 const &)" (__imp_??4tbVector2@@QAE?AV0@ABV0@@Z)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: __thiscall tbVector2::tbVector2(float,float)" (__imp_??0tbVector2@@QAE@MM@Z)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: class tbVector3  __thiscall tbVector3::operator=(class tbVector3 const &)" (__imp_??4tbVector3@@QAE?AV0@ABV0@@Z)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: __thiscall tbVector3::tbVector3(float,float,float)" (__imp_??0tbVector3@@QAE@MMM@Z)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static class tbVector2  __cdecl tbDirect3D::GetScreenSize(void)" (__imp_?GetScreenSize@tbDirect3D@@SA?AVtbVector2@@XZ)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static enum tbResult  __cdecl tbDirect3D::SetRS(enum _D3DRENDERSTATETYPE,unsigned long)" (__imp_?SetRS@tbDirect3D@@SA?AW4tbResult@@W4_D3DRENDERSTATETYPE@@K@Z
)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static enum tbResult  __cdecl tbDirect3D::SetTexture(unsigned long,struct IDirect3DBaseTexture9 *)" (__imp_?SetTexture@tbDirect3D@@SA?AW4tbResult@@KPAUIDirec
t3DBaseTexture9@@@Z)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static enum tbResult  __cdecl tbDirect3D::SetFVF(unsigned long)" (__imp_?SetFVF@tbDirect3D@@SA?AW4tbResult@@K@Z)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static enum tbResult  __cdecl tbDirect3D::BeginScene(void)" (__imp_?BeginScene@tbDirect3D@@SA?AW4tbResult@@XZ)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static enum tbResult  __cdecl tbDirect3D::Clear(unsigned long,struct _D3DRECT const *,unsigned long,unsigned long,float,unsigned long)" (__imp_?Clear@tbDirec
t3D@@SA?AW4tbResult@@KPBU_D3DRECT@@KKMK@Z)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: __thiscall tbColor::operator unsigned long(void)const " (__imp_??BtbColor@@QBEKXZ)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: __thiscall tbColor::tbColor(float,float,float)" (__imp_??0tbColor@@QAE@MMM@Z)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: __thiscall tbVector2::tbVector2(void)" (__imp_??0tbVector2@@QAE@XZ)
intro.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: __thiscall tbVector3::tbVector3(void)" (__imp_??0tbVector3@@QAE@XZ)
missile.obj : error LNK2001: Nichtaufgeloestes externes Symbol "public: enum tbResult  __thiscall CMissile::Exit(void)" (?Exit@CMissile@@QAE?AW4tbResult@@XZ)
missile.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: enum tbResult  __thiscall tbFont::Init(char *,char *)" (__imp_?Init@tbFont@@QAE?AW4tbResult@@PAD0@Z)
missile.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: __thiscall tbFont::tbFont(void)" (__imp_??0tbFont@@QAE@XZ)
missile.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static unsigned long __cdecl tbDirectInput::GetNumButtons(void)" (__imp_?GetNumButtons@tbDirectInput@@SAKXZ)
missile.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static enum tbResult  __cdecl tbDirectInput::Init(struct HWND__ *,unsigned long)" (__imp_?Init@tbDirectInput@@SA?AW4tbResult@@PAUHWND__@@K@Z)
missile.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static enum tbResult  __cdecl tbTextureManager::Init(int)" (__imp_?Init@tbTextureManager@@SA?AW4tbResult@@H@Z)
missile.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static enum tbResult  __cdecl tbDirect3D::Init(struct tbConfig *,char *,struct HWND__ *,struct HICON__ *)" (__imp_?Init@tbDirect3D@@SA?AW4tbResult@@PAUtbCo
nfig@@PADPAUHWND__@@PAUHICON__@@@Z)
missile.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) enum tbResult  __cdecl tbDoConfigDialog(struct tbConfig *)" (__imp_?tbDoConfigDialog@@YA?AW4tbResult@@PAUtbConfig@@@Z)
missile.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) enum tbResult  __cdecl tbInit(void)" (__imp_?tbInit@@YA?AW4tbResult@@XZ)
missile.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static enum tbResult  __cdecl tbDirectInput::GetState(float *,int *)" (__imp_?GetState@tbDirectInput@@SA?AW4tbResult@@PAMPAH@Z)
missile.obj : error LNK2001: Nichtaufgeloestes externes Symbol "public: enum tbResult  __thiscall CMissile::Unload(void)" (?Unload@CMissile@@QAE?AW4tbResult@@XZ)
missile.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: static enum tbResult  __cdecl tbDirect3D::Present(void)" (__imp_?Present@tbDirect3D@@SA?AW4tbResult@@XZ)
missile.obj : error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) enum tbResult  __cdecl tbDoMessageLoop(enum tbResult  (__cdecl*)(float),enum tbResult  (__cdecl*)(float))" (__imp_?tbDoMessageLoop@@YA?AW4tbResult@@P6A?AW41@M@Z0@Z
)
Debug/Missile 3D.exe : fatal error LNK1120: 39 unaufgeloeste externe Verweise
Fehler beim Ausführen von link.exe.

Missile 3D.exe - 43 Fehler, 0 Warnung(en)

[/edit]

Anonymous

unregistriert

4

27.07.2003, 14:03

Kann es sein, dass du vergessen hast (in deiner aktuellen Version, oben steht es ja) zu schreiben:

#include <TriBase.h>

5

27.07.2003, 16:00

Nee, eigentlich nicht.

Ich habe aber jetzt oben die "neue" Version drin. Aber ich glaube auch, dass irgendetwas mit den Include-Dateien falsch ist...

6

27.07.2003, 16:06

vielleicht hast du ja TriBase.lib vergessen zu linken? Sieht für mich ganz danach aus! ;)

7

27.07.2003, 18:43

Hi,

danke für die schnelle Antwort. Kann aber leider nicht sein. Alle anderen Pogramme (galactica, etc.) werden ohne Fehler komplimiert, und in der Liste bei Dateien (bei VS C++) steht etwas von externen Abhängigkeiten. Und dort stehen alle Klassen von TriBase und DirectX. (Vielleicht desshalb?!)

Viele Grüße,

Chrissi

David Scherfgen

Administrator

Beiträge: 10 382

Wohnort: Hildesheim

Beruf: Wissenschaftlicher Mitarbeiter

  • Private Nachricht senden

8

27.07.2003, 19:41

Zitat von »"chrissi"«

Kann aber leider nicht sein. Alle anderen Pogramme (galactica, etc.) werden ohne Fehler komplimiert...

Ja, weil diese Programme ja auch TriBase.lib linken. Tust Du das auch?

9

28.07.2003, 12:42

Das bei Externe Abhängigkeiten sind nur die Header, die alle mit eingebunden werden (glaube ich).

Das galactica usw... kompilliert werden, liegt wahrscheinlich daran, das du die Projektdatei öffnest und dort ist in den Linkereinstellungen wahrscheinlich TriBase.lib dabei. Bei deinen eigenen Projekten musst du das aber selber machen.

10

28.07.2003, 13:39

Tschuldigung.

Ich habe gestern das Buch aufgeschlagen,und da siehe, ich habe wirklich vergesen, eine lib-Datei einzubinden.

Also, Thread abgehagt.

Schüssi,

Chrissi

Werbeanzeige