Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


BluePhase

Member Since 05 Aug 2012
Offline Last Active Jun 11 2013 05:22 PM

Posts I've Made

In Topic: Fatal error LNK1561: entry point must be defined

19 May 2013 - 01:32 PM

Thanks so much! Finally fixed all the errors. Thanks again ;)


In Topic: Fatal error LNK1561: entry point must be defined

19 May 2013 - 11:43 AM

// global function in .cpp, no need to put declare it in .h
int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow ) {
    // create Game object here and call wWinMain method
}

 

It seemed to work but now I am getting new errors:

 

1>Game.obj : error LNK2019: unresolved external symbol "public: __thiscall Game::Game(void)" (??0Game@@QAE@XZ) referenced in function _wWinMain@16
1>Game.obj : error LNK2019: unresolved external symbol "public: __thiscall Game::Game(struct HINSTANCE__ *)" (??0Game@@QAE@PAUHINSTANCE__@@@Z) referenced in function "void __cdecl `dynamic initializer for 'ApplicationHandle''(void)" (??__EApplicationHandle@@YAXXZ)
1>Game.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall Game::~Game(void)" (??1Game@@UAE@XZ) referenced in function "void __cdecl `dynamic atexit destructor for 'ApplicationHandle''(void)" (??__FApplicationHandle@@YAXXZ)

 

I'm not sure why  this is happening either.


In Topic: Fatal error LNK1561: entry point must be defined

19 May 2013 - 01:24 AM

Are you coming from Java? In C++ main function is global, not in a class.

Yea I am a general Java programmer trying to get into C++ game development. How could I modify my code into just keeping the main function as global? Would I need to just not derive from the class and just directly do int WINAPI wWinMain()?


In Topic: Fatal error LNK1561: entry point must be defined

18 May 2013 - 08:36 PM

Where is your global WinMain function?

Isn't that in my header file? I declared wWinMain in my Game.h and used Game::wWinMain in my Game.cpp file.


In Topic: Any reason why my collision doesn't work?

23 October 2012 - 03:55 PM

When you draw the mesh, you generally apply a world matrix. If that world matrix includes a scaling component, then you also need to include that when generating your bounding sphere.

It should only take a few seconds to check this in the debugger. Just set a breakpoint on that section of the code and take a look at the values. The bounding spheres are obviously not intersecting, so what do the values look like?

You can take a few seconds to figure it out yourself, or you can keep wasting time guessing and hoping someone will figure it out for you.... your choice :-)

Still having a difficult time understanding how to implement that :3

PARTNERS