Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    68
  • comments
    57
  • views
    42113

WoW searched for hours and cant figure it out.

Sign in to follow this  
RanBlade

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.cpp
Linking...
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 externals
Error 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 :/
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!