Problems with wx 3.0.x with VC12

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
kc.videri
In need of some credit
In need of some credit
Posts: 1
Joined: Wed Jun 14, 2017 7:21 pm

Problems with wx 3.0.x with VC12

Post by kc.videri »

Hi!

I believe that my problem is a problem with VC. My code already works in Linux using wxWidget 2.8 and 3.0.

I download wxWidget 3.0.3 and compile it using VC12 (VC2013) as static lib.

When I compile my own library against wxWidget I got the following error message:
wxbbt.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: void __thiscall wxAnyButtonBase::SetBitmapDisabled(class wxBitmap const &)" (__imp_?SetBitmapDisabled@wxAnyButtonBase@@QAEXABVwxBitmap@@@Z)" in Funktion "_SMPOLWX_DoWx_CreateBitmapButton@28".
wxbbt.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: void __thiscall wxAnyButtonBase::SetBitmapFocus(class wxBitmap const &)" (__imp_?SetBitmapFocus@wxAnyButtonBase@@QAEXABVwxBitmap@@@Z)" in Funktion "_SMPOLWX_DoWx_CreateBitmapButton@28".
wxbbt.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: void __thiscall wxAnyButtonBase::SetBitmapSelected(class wxBitmap const &)" (__imp_?SetBitmapSelected@wxAnyButtonBase@@QAEXABVwxBitmap@@@Z)" in Funktion "_SMPOLWX_DoWx_CreateBitmapButton@28".
wxgrd.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: __thiscall wxGridCellAutoWrapStringEditor::wxGridCellAutoWrapStringEditor(void)" (__imp_??0wxGridCellAutoWrapStringEditor@@QAE@XZ)" in Funktion ""public: __thiscall SimpolwxGrid::SimpolwxGrid(class wxWindow *,int,class wxPoint const &,class wxSize const &,long,class wxString const &)" (??0SimpolwxGrid@@QAE@PAVwxWindow@@HABVwxPoint@@ABVwxSize@@JABVwxString@@@Z)".
wxgrd.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: virtual __thiscall wxGridCellAutoWrapStringEditor::~wxGridCellAutoWrapStringEditor(void)" (__imp_??1wxGridCellAutoWrapStringEditor@@UAE@XZ)" in Funktion ""public: virtual void * __thiscall wxGridCellAutoWrapStringEditor::`scalar deleting destructor'(unsigned int)" (??_GwxGridCellAutoWrapStringEditor@@UAEPAXI@Z)".
wxgrd.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual class wxGridCellEditor * __thiscall wxGridCellAutoWrapStringEditor::Clone(void)const " (?Clone@wxGridCellAutoWrapStringEditor@@UBEPAVwxGridCellEditor@@XZ)".
wxgrd.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual class wxGridCellRenderer * __thiscall wxGridCellAutoWrapStringRenderer::Clone(void)const " (?Clone@wxGridCellAutoWrapStringRenderer@@UBEPAVwxGridCellRenderer@@XZ)".
wxszx.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: void __thiscall wxWindowBase::MoveBeforeInTabOrder(class wxWindow *)" (__imp_?MoveBeforeInTabOrder@wxWindowBase@@QAEXPAVwxWindow@@@Z)" in Funktion ""public: void __thiscall SimpolwxSizeBox::maybegrabfocus(void)" (?maybegrabfocus@SimpolwxSizeBox@@QAEXXZ)".
wxut.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: void __thiscall wxWindowBase::MoveBeforeInTabOrder(class wxWindow *)" (__imp_?MoveBeforeInTabOrder@wxWindowBase@@QAEXPAVwxWindow@@@Z)".
wxscr.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: __thiscall wxScrollBar::wxScrollBar(class wxWindow *,int,class wxPoint const &,class wxSize const &,long,class wxValidator const &,class wxString const &)" (__imp_??0wxScrollBar@@QAE@PAVwxWindow@@HABVwxPoint@@ABVwxSize@@JABVwxValidator@@ABVwxString@@@Z)" in Funktion ""public: __thiscall SimpolwxScrollBar::SimpolwxScrollBar(class wxWindow *,int,class wxPoint const &,class wxSize const &,long)" (??0SimpolwxScrollBar@@QAE@PAVwxWindow@@HABVwxPoint@@ABVwxSize@@J@Z)".
wxgph.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: enum wxRasterOperationMode __thiscall wxDC::GetLogicalFunction(void)const " (__imp_?GetLogicalFunction@wxDC@@QBE?AW4wxRasterOperationMode@@XZ)" in Funktion ""public: void __thiscall SimpolwxGraphicBase::DrawAllGraphics(class wxDC &)" (?DrawAllGraphics@SimpolwxGraphicBase@@QAEXAAVwxDC@@@Z)".
wxwinrb.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: enum wxRasterOperationMode __thiscall wxDC::GetLogicalFunction(void)const " (__imp_?GetLogicalFunction@wxDC@@QBE?AW4wxRasterOperationMode@@XZ)".
wxgph.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: void __thiscall wxDC::DrawEllipticArc(int,int,int,int,double,double)" (__imp_?DrawEllipticArc@wxDC@@QAEXHHHHNN@Z)" in Funktion ""public: static void __cdecl SimpolwxGraphic::drawarc(struct sm__wxgraphicdata *,class wxDC &)" (?drawarc@SimpolwxGraphic@@SAXPAUsm__wxgraphicdata@@AAVwxDC@@@Z)".
wxfnt.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: bool __thiscall wxGDIObject::Ok(void)const " (__imp_?Ok@wxGDIObject@@QBE_NXZ)" in Funktion "_SMPOLWX_CreateCopyFont@12".
wxbmp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: bool __thiscall wxGDIObject::Ok(void)const " (__imp_?Ok@wxGDIObject@@QBE_NXZ)".
wxcmn.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: bool __thiscall wxGDIObject::Ok(void)const " (__imp_?Ok@wxGDIObject@@QBE_NXZ)".
wxfnt.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: void __thiscall wxWindowBase::SetOwnFont(class wxFont const &)" (__imp_?SetOwnFont@wxWindowBase@@QAEXABVwxFont@@@Z)" in Funktion "_SMPOLWX_SetControlFont@12".
wxmen.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: class wxMenuItem * __thiscall wxMenuBase::Append(class wxMenuItem *)" (__imp_?Append@wxMenuBase@@QAEPAVwxMenuItem@@PAV2@@Z)" in Funktion ""void __cdecl _workaround_rebuild(class wxMenu *,unsigned int)" (?_workaround_rebuild@@YAXPAVwxMenu@@I@Z)".
wxbmp.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) void __cdecl wxInitAllImageHandlers(void)" (__imp_?wxInitAllImageHandlers@@YAXXZ)" in Funktion ""void __fastcall _x_checkloadedhandlers(void)" (?_x_checkloadedhandlers@@YIXXZ)".
wxtbr.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: __thiscall wxControl::wxControl(class wxWindow *,int,class wxPoint const &,class wxSize const &,long,class wxValidator const &,class wxString const &)" (__imp_??0wxControl@@QAE@PAVwxWindow@@HABVwxPoint@@ABVwxSize@@JABVwxValidator@@ABVwxString@@@Z)" in Funktion "_SMPOLWX_ToolbarCreateControlForForm@24".
wxcmn.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""__declspec(dllimport) char const * const wxDirDialogNameStr" (__imp_?wxDirDialogNameStr@@3QBDB)".
wxpot.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: int __thiscall wxDC::GetBackgroundMode(void)const " (__imp_?GetBackgroundMode@wxDC@@QBEHXZ)" in Funktion ""public: static void __cdecl SimpolwxPrintoutPage::DrawTextData(struct sm__wxprinttextsenddata *,unsigned short *,class wxDC &,double,bool,class SimpolwxStoreOfTwinsNeededByPrintout *)" (?DrawTextData@SimpolwxPrintoutPage@@SAXPAUsm__wxprinttextsenddata@@PAGAAVwxDC@@N_NPAVSimpolwxStoreOfTwinsNeededByPrintout@@@Z)".
wxaut.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: void __thiscall wxString::SetChar(unsigned int,class wxUniChar)" (__imp_?SetChar@wxString@@QAEXIVwxUniChar@@@Z)" in Funktion ""unsigned long __fastcall _x_getvariantvalue(unsigned char *,unsigned long,unsigned long *,class wxVariant &)" (?_x_getvariantvalue@@YIKPAEKPAKAAVwxVariant@@@Z)".
wxaut.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: __thiscall wxVariant::operator class wxString(void)const " (__imp_??BwxVariant@@QBE?AVwxString@@XZ)" in Funktion ""unsigned long __fastcall _x_genericvaluecommand(struct sm__wxcommand *,struct sm__wxcommand *,unsigned char * *,unsigned long *,unsigned long (__fastcall*)(class wxAutomationObject *,class wxString,int,class wxVariant *,class wxVariant &))" (?_x_genericvaluecommand@@YIKPAUsm__wxcommand@@0PAPAEPAKP6IKPAVwxAutomationObject@@VwxString@@HPAVwxVariant@@AAV4@@Z@Z)".
wxaut.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: __thiscall wxAutomationObject::wxAutomationObject(void *)" (__imp_??0wxAutomationObject@@QAE@PAX@Z)" in Funktion ""public: __thiscall SimpolwxAutomation1::SimpolwxAutomation1(struct sm__wxtwinid)" (??0SimpolwxAutomation1@@QAE@Usm__wxtwinid@@@Z)".
wxaut.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: virtual __thiscall wxAutomationObject::~wxAutomationObject(void)" (__imp_??1wxAutomationObject@@UAE@XZ)" in Funktion "__unwindfunclet$??0SimpolwxAutomation1@@QAE@Usm__wxtwinid@@@Z$0".
wxaut.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: bool __thiscall wxAutomationObject::GetInstance(class wxString const &,int)const " (__imp_?GetInstance@wxAutomationObject@@QBE_NABVwxString@@H@Z)" in Funktion "_SMPOLWX_DoWx_CreateAutomation1@16".
wxaut.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: bool __thiscall wxAutomationObject::CreateInstance(class wxString const &)const " (__imp_?CreateInstance@wxAutomationObject@@QBE_NABVwxString@@@Z)" in Funktion "_SMPOLWX_DoWx_CreateAutomation1@16".
wxaut.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: class wxVariant __thiscall wxAutomationObject::CallMethod(class wxString const &,int,class wxVariant * const)" (__imp_?CallMethod@wxAutomationObject@@QAE?AVwxVariant@@ABVwxString@@HQAV2@@Z)" in Funktion ""unsigned long __fastcall _x_callmethod(class wxAutomationObject *,class wxString,int,class wxVariant *,class wxVariant &)" (?_x_callmethod@@YIKPAVwxAutomationObject@@VwxString@@HPAVwxVariant@@AAV3@@Z)".
wxaut.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: class wxVariant __thiscall wxAutomationObject::GetProperty(class wxString const &,class wxVariant const &,class wxVariant const &,class wxVariant const &,class wxVariant const &,class wxVariant const &,class wxVariant const &)" (__imp_?GetProperty@wxAutomationObject@@QAE?AVwxVariant@@ABVwxString@@ABV2@11111@Z)" in Funktion ""unsigned long __fastcall _x_getproperty(class wxAutomationObject *,class wxString,int,class wxVariant *,class wxVariant &)" (?_x_getproperty@@YIKPAVwxAutomationObject@@VwxString@@HPAVwxVariant@@AAV3@@Z)".
wxaut.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: bool __thiscall wxAutomationObject::PutProperty(class wxString const &,int,class wxVariant * const)" (__imp_?PutProperty@wxAutomationObject@@QAE_NABVwxString@@HQAVwxVariant@@@Z)" in Funktion ""unsigned long __fastcall _x_putproperty(class wxAutomationObject *,class wxString,int,class wxVariant *,class wxVariant &)" (?_x_putproperty@@YIKPAVwxAutomationObject@@VwxString@@HPAVwxVariant@@AAV3@@Z)".
wxaut.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: bool __thiscall wxAutomationObject::GetObject(class wxAutomationObject &,class wxString const &,int,class wxVariant * const)const " (__imp_?GetObject@wxAutomationObject@@QBE_NAAV1@ABVwxString@@HQAVwxVariant@@@Z)" in Funktion "_SMPOLWX_DoWx_Automation1GetObject@16".
smwxwn32.dll : fatal error LNK1120: 28 nicht aufgelöste Externe
NMAKE : fatal error U1077: "c:\MSVC\bin\link.EXE": Rückgabe-Code "0x460"
Stop.

Can anybody help me to get the missing external symbols

Thanks in advance

CU
Michael
coderrc
Earned some good credits
Earned some good credits
Posts: 141
Joined: Tue Nov 01, 2016 2:46 pm

Re: Problems with wx 3.0.x with VC12

Post by coderrc »

are your VC++ directories and precompiler options correctly set up?

(my examples assume a unicode DEBUG build since thats what I have open)

precompiler:
__WXMSW__
__WXDEBUG__
_UNICODE

include dirs:
yourLibDir\wxWidgets-3.1.0\include\msvc
yourLibDir\wxWidgets-3.1.0\include
yourLibDir\wxWidgets-3.1.0/lib/vc_lib/mswud
yourLibDir\wxWidgets-3.1.0/contrib/include

library dirs:
yourLibDir\wxWidgets-3.1.0\lib\vc_lib

linker additional dependencies:
;wxmsw31ud_xrc.lib;wxmsw31ud_richtext.lib;wxmsw31ud_aui.lib;wxmsw31ud_html.lib;wxmsw31ud_stc.lib;wxmsw31ud_propgrid.lib;wxmsw31ud_ribbon.lib;wxmsw31ud_core.lib;wxbase31ud.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxmsw31ud_adv.lib;wxmsw31ud_html.lib;wxmsw31ud_xrc.lib;wxbase31ud_net.lib;wxbase31ud_xml.lib;wxexpatd.lib;%(AdditionalDependencies)
User avatar
doublemax
Moderator
Moderator
Posts: 19102
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Problems with wx 3.0.x with VC12

Post by doublemax »

My first guesses would be:
a) that you didn't do a clean rebuild
or
b) that you're including files from another wxWidgets version somewhere
or
c) that the build settings between your library and wxWidgets are not identical.
Use the source, Luke!
Post Reply