#include "darkGDK.h"
#include "player.h"
#include "arrowtower.h"
void DarkGDK(void){
int sprites = 0;
arrowtower mainarrow;
player player1;
dbSyncOn();
dbSyncRate(60);
dbDisableEscapeKey();
dbLoadImage("graphics/background.png",1);
dbSprite(1,0,0,1);
dbDrawSpritesFirst();
while (LoopGDK()){
if (dbMouseX() > 153 && dbMouseX() < 227 && dbMouseY() > 14 && dbMouseY() < 93){
if (dbMouseClick() == 1){
mainarrow.buy(player1);
mainarrow.sprite(dbMouseX() + 37, dbMouseY() + 37);
mainarrow.selecttower(true);
}
}
if (mainarrow.gettowerselected()){
mainarrow.sprite(dbMouseX() + 37, dbMouseY() + 37);
}
if (dbEscapeKey() == 1){
break;
}
dbSync();
}
for (int i = 0; i < sprites; i++){
dbDeleteImage(i);
dbDeleteSprite(i);
}
return;
}
errors:
1 2 3 4 5 6 7 8 9
1>LINK : H:\Documents and Settings\Rensel\Desktop\C++ Projects\DeathToGoblins\Debug\DeathToGoblins.exe not found or not built by the last incremental link; performing full link
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>arrowtower.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall tower::upgrade(class player &)" (?upgrade@tower@@MAEXAAVplayer@@@Z)
1>arrowtower.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall tower::sell(int,class player &)" (?sell@tower@@MAEXHAAVplayer@@@Z)
1>arrowtower.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall tower::sprite(int,int)" (?sprite@tower@@MAEXHH@Z)
1>arrowtower.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall tower::buy(class player &)" (?buy@tower@@MAEXAAVplayer@@@Z)
1>arrowtower.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall tower::selecttower(bool)" (?selecttower@tower@@MAEX_N@Z)
1>arrowtower.obj : error LNK2001: unresolved external symbol "protected: virtual bool __thiscall tower::gettowerselected(void)" (?gettowerselected@tower@@MAE_NXZ)
1>arrowtower.obj : error LNK2001: unresolved external symbol "public: static int tower::towerid" (?towerid@tower@@2HA)
Maybe you should define your class tower as abstract. In this case its virtual functions can be declared as pure virtual the following way (for example)