Error while integrating WxWidget2.8 in my 32-bit app in visual studio 2015

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
kyadav78
Knows some wx things
Knows some wx things
Posts: 29
Joined: Thu Feb 22, 2018 10:37 am

Error while integrating WxWidget2.8 in my 32-bit app in visual studio 2015

Post by kyadav78 »

Hi,
I have compiled the wxWidget2.8 statically for both debug and release mode, it successfully compiled, but when i am integrating with my application, it is throwing lot of wxonassert and "wxEmptyString" errors alogn with other wx errors.:
wxwidget2.8 compilation command:
nmake -f makefile.vc CFLAGS="-DJPEG_SUPPORT" CXXFLAGS="-DJPEG_SUPPORT" BUILD=debug UNICODE=1 SHARED=1 DEBUG_INFO=1 USE_OPENGL=1 USE_GUI=1 USE_HTML=1 USE_OBDC=1 USE_THREADS=1 USE_GDIPLUS=1 VENDOR=%2
nmake -f makefile.vc CFLAGS="-DJPEG_SUPPORT" CXXFLAGS="-DJPEG_SUPPORT" BUILD=release UNICODE=1 SHARED=1 DEBUG_INFO=1 USE_OPENGL=1 USE_GUI=1 USE_HTML=1 USE_OBDC=1 USE_THREADS=1 USE_GDIPLUS=1 VENDOR=%2
nmake -f makefile.vc CFLAGS="-DJPEG_SUPPORT" CXXFLAGS="-DJPEG_SUPPORT" BUILD=debug UNICODE=1 SHARED=0 USE_OPENGL=1 USE_GUI=1 USE_HTML=1 USE_OBDC=1 USE_THREADS=1 USE_GDIPLUS=1 VENDOR=%2
nmake -f makefile.vc CFLAGS="-DJPEG_SUPPORT" CXXFLAGS="-DJPEG_SUPPORT" BUILD=release UNICODE=1 SHARED=0 USE_OPENGL=1 USE_GUI=1 USE_HTML=1 USE_OBDC=1 USE_THREADS=1 USE_GDIPLUS=1 VENDOR=%2



28>JDFToFiery.lib(JDFToFiery.obj) : error LNK2001: unresolved external symbol "void __cdecl wxOnAssert(unsigned short const *,int,char const *,unsigned short const *,unsigned short const *)" (?wxOnAssert@@YAXPBGHPBD00@Z)
28>JDFToFiery.lib(ViewPaperTicket.obj) : error LNK2001: unresolved external symbol "void __cdecl wxOnAssert(unsigned short const *,int,char const *,unsigned short const *,unsigned short const *)" (?wxOnAssert@@YAXPBGHPBD00@Z)
28>HarmonyLayer.lib(HarmonyServer.obj) : error LNK2001: unresolved external symbol "void __cdecl wxOnAssert(unsigned short const *,int,char const *,unsigned short const *,unsigned short const *)" (?wxOnAssert@@YAXPBGHPBD00@Z)
28>HarmonyLayer.lib(HarmonyJobEvent.obj) : error LNK2001: unresolved external symbol "void __cdecl wxOnAssert(unsigned short const *,int,char const *,unsigned short const *,unsigned short const *)" (?wxOnAssert@@YAXPBGHPBD00@Z)
28>RuleFileProcessor.lib(RuleSetNormalizer.obj) : error LNK2001: unresolved external symbol "void __cdecl wxOnAssert(unsigned short const *,int,char const *,unsigned short const *,unsigned short const *)" (?wxOnAssert@@YAXPBGHPBD00@Z)
28>RuleFileProcessor.lib(Rule.obj) : error LNK2001: unresolved external symbol "void __cdecl wxOnAssert(unsigned short const *,int,char const *,unsigned short const *,unsigned short const *)" (?wxOnAssert@@YAXPBGHPBD00@Z)
28>ServerMonitor.lib(CreateDevCapXML.obj) : error LNK2001: unresolved external symbol "void __cdecl wxOnAssert(unsigned short const *,int,char const *,unsigned short const *,unsigned short const *)" (?wxOnAssert@@YAXPBGHPBD00@Z)
8>JDFToFiery.lib(ViewPaperTicket.obj) : error LNK2001: unresolved external symbol "unsigned short const * const wxEmptyString" (?wxEmptyString@@3PBGB)
28>FileDownLoader.lib(FTPDownLoader.obj) : error LNK2001: unresolved external symbol "unsigned short const * const wxEmptyString" (?wxEmptyString@@3PBGB)
28>FileDownLoader.lib(HTTPDownLoader.obj) : error LNK2001: unresolved external symbol "unsigned short const * const wxEmptyString" (?wxEmptyString@@3PBGB)
28>FileDownLoader.lib(HTTPSDownLoader.obj) : error LNK2001: unresolved external symbol "unsigned short const * const wxEmptyString" (?wxEmptyString@@3PBGB)
28>EventMonitor.lib(JobRippingProgressEventHandler.obj) : error LNK2001: unresolved external symbol "unsigned short const * const wxEmptyString" (?wxEmptyString@@3PBGB)
28>FileUploader.lib(HotFolderUploader.obj) : error LNK2001: unresolved external symbol "unsigned short const * const wxEmptyString" (?wxEmptyString@@3PBGB)

i believe there is mismatch in configuration in building wxwidget and my application. Could you please help me out in finding out that difference?
Regards
Kunal
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Error while integrating WxWidget2.8 in my 32-bit app in visual studio 2015

Post by doublemax »

All the "unsigned short const *" in the error messages indicate that the Unicode version of wxWidgets is not found. But the "UNICODE=1" shows that you did build the Unicode libraries.

You either:
- didn't link to the wxWidgets libraries at all
- linked to a wrong (maybe ANSI) version of the libraries
- maybe some preprocessor symbols are wrong/missing. (although that should lead to compiler errors, not linker errors. But who knows...)
Use the source, Luke!
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: Error while integrating WxWidget2.8 in my 32-bit app in visual studio 2015

Post by stahta01 »

You can try defining "_UNICODE" in addition to "UNICODE" to see if the other or both are needed.
I mean when compiling your application; not when building wxWidgets.

Tim S.
Post Reply