Hey Leute,
ich bin jetzt bei Kapitel 12 angekommen und wollte das Spiel kompilieren, um zu sehen, was mich da so erwartet.
Ich benutze Visual C++ 2008 Express Edition, für das die Einrichtungsanleitung im Buch leider nicht mehr gültig ist.
Nach etwas Fummelei und Recherche konnte ich aber trotzdem SDL einrichten und zwar so:
Tools > Options > Projects and Solutions > VC++ Directories > Include files > C:\SDL-1.2.14\include
Tools > Options > Projects and Solutions > VC++ Directories > Library files > C:\SDL-1.2.14\lib
Project > SDL_Game Properties > C/C++ > Code Generation > Runtime Library > Multi-threaded DLL (/MD)
Project > SDL_Game Properties > Linker > Input > Additional Dependencies > odbc32.lib odbccp32.lib sdl.lib sdlmain.lib
Leider kompiliert das Spiel nicht und ich bekomme nach Drücken von F7 (Build Solution) in der Debug-Konfiguration folgende Fehler beim Linken:
|
Quellcode
|
1
2
3
4
|
1>Linking...
1>Game.obj : error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: class std::list<class CAsteroid,class std::allocator<class CAsteroid> >::_Const_iterator<1> & __thiscall std::list<class CAsteroid,class std::allocator<class CAsteroid> >::_Const_iterator<1>::operator++(void)" (??E?$_Const_iterator@$00@?$list@VCAsteroid@@V?$allocator@VCAsteroid@@@std@@@std@@QAEAAV012@XZ)
1>Player.obj : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
1>.\Debug/SDL_Game.exe : fatal error LNK1120: 1 unresolved externals
|
In der Release-Konfiguration ist die Fehlerliste noch viel größer und absolut unüberschaubar.
Wenn ich in folgende Einstellung mache, kompiliert das Spiel zumindest schon in der Debug-Konfiguration:
Project > SDL_Game Properties > C/C++ > Code Generation > Runtime Library > Multi-threaded Debug DLL (/MDd)
In der Release-Konfiguration kann ich damit das Spiel aber immer noch nicht kompilieren.
Was ist das für ein Problem, warum taucht es auf und wie kann ich es lösen?
Grüße,
KleinerCoder