• entries
68
57
• views
42113

# WoW searched for hours and cant figure it out.

307 views

I have gone through my books, searched the net, changed my code around but I just cant get it to work.

I have my engine as one project. then I created Fantasy Battle as another project and Iam including the files. for some reason i keep getting unresolved link errors that all the things on the web say that its caused by declaring your function but not defineing it.. Well I have defined it so Iam doing something else wrong. The only thing I can find is this damn "failure to define your functions stuff" and thats not my problem..

Compiling...game.cppLinking...game.obj : error LNK2001: unresolved external symbol "public: struct SDL_Surface * __thiscall Surface::LoadImage(char *)" (?LoadImage@Surface@@QAEPAUSDL_Surface@@PAD@Z)game.obj : error LNK2001: unresolved external symbol "public: void __thiscall Video_System::DrawSprite(struct SDL_Surface *,int,int)" (?DrawSprite@Video_System@@QAEXPAUSDL_Surface@@HH@Z)game.obj : error LNK2001: unresolved external symbol "class Video_System Video" (?Video@@3VVideo_System@@A)game.obj : error LNK2001: unresolved external symbol "public: struct SDL_Surface * __thiscall Surface::GetSurface(void)" (?GetSurface@Surface@@QAEPAUSDL_Surface@@XZ)game.obj : error LNK2001: unresolved external symbol "public: bool __thiscall STATE_System::HandleInput(void)" (?HandleInput@STATE_System@@QAE_NXZ)game.obj : error LNK2001: unresolved external symbol "public: void __thiscall Video_System::SetProgName(char *)" (?SetProgName@Video_System@@QAEXPAD@Z)game.obj : error LNK2001: unresolved external symbol "public: void __thiscall Video_System::Init(void)" (?Init@Video_System@@QAEXXZ)Debug/Fantasy Battle.exe : fatal error LNK1120: 7 unresolved externalsError executing link.exe.

these errors are in my Fantasy Battle project. The Surface and video function declarartions are in video.h of my game engine project and the defenition is in video.cpp, the state_system is in system.h of my game engine project and the defenetions are in system.cpp ... and so on for the others...

So atm Iam stumped but hope to figure it out soon.

{EDIT} So after furthur testing if I include the .cpp files as well then it will link just fine. But I didnt want to have to include any cpp files. so gota keep looking for how to fix this :/

There are no comments to display.

## Create an account

Register a new account