I have been following the great document CompilingGMATwithVS2010.pdf (as found here: http://li394-117.members.linode.com:8090/display/GW/Compiling), and my luck has been fairly good up until the point where I am actually building GMAT. I was able to build wxWidgets without too much trouble (I did have to set the include directories manually), and building GMAT starts off just fine. However, during the linking phase I get a whopping 1,905 "LNK2001: unresolved external" errors which prevent GMAT.exe from being created. All the LNK2001s seem to come from functions with "wx" in the prefix, which makes me think this is a wxWidgets problem. Here's a short sample of the errors:
- Code: Select all
1>------ Build started: Project: GMAT_wxGui, Configuration: Release Win32 ------
1>AboutDialog.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual class wxObjectRefData * __thiscall wxObject::CloneRefData(class wxObjectRefData const *)const " (__imp_?CloneRefData@wxObject@@MBEPAVwxObjectRefData@@PBV2@@Z)
1>AboutDialog.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual class wxObjectRefData * __thiscall wxObject::CreateRefData(void)const " (__imp_?CreateRefData@wxObject@@MBEPAVwxObjectRefData@@XZ)
1>AboutDialog.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void * __thiscall wxClientDataContainer::DoGetClientData(void)const " (__imp_?DoGetClientData@wxClientDataContainer@@MBEPAXXZ)
1>AboutDialog.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall wxClientDataContainer::DoSetClientData(void *)" (__imp_?DoSetClientData@wxClientDataContainer@@MAEXPAX@Z)
1>AboutDialog.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual class wxClientData * __thiscall wxClientDataContainer::DoGetClientObject(void)const " (__imp_?DoGetClientObject@wxClientDataContainer@@MBEPAVwxClientData@@XZ)
1>AboutDialog.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall wxClientDataContainer::DoSetClientObject(class wxClientData *)" (__imp_?DoSetClientObject@wxClientDataContainer@@MAEXPAVwxClientData@@@Z)
1>AboutDialog.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall wxControlBase::DoUpdateWindowUI(class wxUpdateUIEvent &)" (__imp_?DoUpdateWindowUI@wxControlBase@@UAEXAAVwxUpdateUIEvent@@@Z)
1>AboutDialog.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __thiscall wxControlBase::SetFont(class wxFont const &)" (__imp_?SetFont@wxControlBase@@UAE_NABVwxFont@@@Z)
1>AboutDialog.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall wxControlBase::SetLabel(class wxString const &)" (__imp_?SetLabel@wxControlBase@@UAEXABVwxString@@@Z)
1>AboutDialog.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall wxIcon::~wxIcon(void)" (__imp_??1wxIcon@@UAE@XZ)
1>AboutDialog.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall wxIcon::wxIcon(class wxString const &,long,int,int)" (__imp_??0wxIcon@@QAE@ABVwxString@@JHH@Z)
1>AboutDialog.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __thiscall wxBitmap::LoadFile(class wxString const &,long)" (__imp_?LoadFile@wxBitmap@@UAE_NABVwxString@@J@Z)
1>AboutDialog.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class wxImage __thiscall wxBitmap::ConvertToImage(void)const " (__imp_?ConvertToImage@wxBitmap@@QBE?AVwxImage@@XZ)
...
Note: this particular output was created after selecting "Link Only GMAT_wxGui" on the GMAT_wxGui project. The same errors came up at the end of building GMAT_wxGui, but since it takes 20+ minutes to build I just chose to link to show these errors.
My compilation of wxWidgets went okay, and I have all 15 .dll files as specified in the guide. It looks like the problem is that VS2010 can't find the necessary functions in these .dll files when linking for GMAT.exe, but I have no idea how to fix that. All .dlls are present in the "Additional Library Directories" field of the project's "Linker" properties.
Thanks for the help!