Hi, I'm new here.
I've got a problem with my project. I get the following link error in VS2008
main.obj : error LNK2019: unresolved external symbol "public: __thiscall PSystemManager::PSystemManager(struct HWND__ *)" (??0PSystemManager@@QAE@PAUHWND__@@@Z) referenced in function "public: virtual bool __thiscall MyApp::OnInit(void)" (?OnInit@MyApp@@UAE_NXZ)
main.cpp is for example this:
#include "./PSystemManager.h"
bool MyApp::OnInit(){
....
PSystemManager* ps = new PSystemManager(pgui->getDrawArea());
.....
}
PSystemManager is a class I made and has this constructor PSystemManager(HWND wind);
which is defined in PSystemManager.cpp file(which includes PSystemManager.h)
They both include <windows.h> for HWND. If I call the empty constructor of my class I get no linker error, so it propably has to do with HWND. Have I forgotten something in my linker options?
Any idea why I'm getting this error? Thanks a lot
----------------------End of question 1--------------------
Also if anyone knows anything about wxWidgets, I'm also getting this linker error:
ParticleGUI.obj : error LNK2019: unresolved external symbol "public: __thiscall wxGLCanvas::wxGLCanvas(class wxWindow *,int,int *,class wxPoint const &,class wxSize const &,long,class wxString const &,class wxPalette const &)" (??0wxGLCanvas@@QAE@PAVwxWindow@@HPAHABVwxPoint@@ABVwxSize@@JABVwxString@@ABVwxPalette@@@Z) referenced in function "public: __thiscall ParticleGUI::ParticleGUI(class wxString const &,class wxSize)" (??0ParticleGUI@@QAE@ABVwxString@@VwxSize@@@Z)
I am including <wx/glcanvas.h> in that function. BUT to make it compile I had to change 4 header files of wxWidgets in its /include/ folder.
To enable wxGLCanvas I had to set in the setup.h files wxUSE_GLCANVAS to 1. And also had to correct a mistake in glcanvas.h file which had #if wxUSE_GLCANVAS instead of #ifdef wxUSE_GLCANVAS.
Then it finally compiled but I'm getting this linker error.
Someone told me that perhaps I have to recompile all the .lib's of wxWidgets now that I changed their header files,and that this might be what's causing this, but I got no idea how to do this
I got in my linker input both opengl32.lib and glut32.lib which was suggested somewhere
Any help appreciated