Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8502859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:36:07+00:00 2026-06-11T01:36:07+00:00

I cannot get a wxWidgets program that uses the wxWidgets static libraries to compile

  • 0

I cannot get a wxWidgets program that uses the wxWidgets static libraries to compile and link properly under VC++ 2010. Under VC++ 2008, it’s fine. (WxWidgets still ships with vc++ 2008 project files.)

I compiled and ran the “minimal” sample program that comes with wxWidgets. It is a GUI hello world. No problem. I used VC++ 2010 to convert the .vsproj to .vsxproj and attempt to compile and link under VC++ 2010. Problem.

Be assured that I changed absolutely nothing other than to run the VC++ 2010 conversion to create minimal.vsxproj.

I got many linker warnings and errors, all having to do with STL wchar_t strings in the wxWidgets libs. Here is what I think is happening. I believe there must be #ifdefs in the wxWidgets code that select __declspec(import) or not, based on preprocessor symbols. When VC++ 2010 converted the project, it must have changed the symbols to something that fools wxWidgets. If so, the bug could be in either place, either wxWidgets is making invalid assumptions about pre-processor definitions, or the VC++ 2010 conversion messed them up.
The command lines for compiling the lone .cpp file in the project differ more than I would expect them to.

2008 command line

/Od /I “…..\lib\vc_lib\mswud” /I “…..\include” /I “.” /I
“…..\samples” /D “WIN32” /D “_DEBUG” /D
“_CRT_SECURE_NO_DEPRECATE=1” /D “_CRT_NON_CONFORMING_SWPRINTFS=1” /D
“_SCL_SECURE_NO_WARNINGS=1” /D “WXMSW” /D “_UNICODE” /D “_WINDOWS”
/D “NOPCH” /D “UNICODE” /FD /EHsc /RTC1 /MDd /Fo”vc_mswud\minimal\”
/Fd”vc_mswud\minimal.pdb” /W4 /nologo /c /Zi /TP /errorReport:prompt
/MP

2010 command line

/I”…..\lib\vc_lib\mswud” /I”…..\include” /I”.”
/I”…..\samples” /Zi /nologo /W4 /WX- /Od /Oy- /D “WIN32” /D
“_DEBUG” /D “_CRT_SECURE_NO_DEPRECATE=1” /D
“_CRT_NON_CONFORMING_SWPRINTFS=1” /D “_SCL_SECURE_NO_WARNINGS=1” /D
“WXMSW” /D “_UNICODE” /D “_WINDOWS” /D “NOPCH” /Gm- /EHsc /RTC1
/MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR
/Fp”vc_mswud\minimal\minimal.pch” /Fa”vc_mswud\minimal\”
/Fo”vc_mswud\minimal\” /Fd”vc_mswud\minimal.pdb” /Gd /analyze-
/errorReport:queue

Example 2010 warning and error

1>wxbase29ud.lib(ipcbase.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@XZ (public: __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::~basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >(void)) imported

1>wxbase29ud.lib(mimecmn.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > & __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::assign(class std::_String_const_iterator<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >,class std::_String_const_iterator<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >)" (__imp_?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:36:09+00:00Added an answer on June 11, 2026 at 1:36 am

    You absolutely must build wxWidgets and the application using it with the same version of the compiler, different MSVC versions use different, incompatible versions of the CRT and so there is no chance at all that you can use VC10 to build an application and link it with wxWidgets built with VC9.

    As for building wx itself with VC10, there are indeed sometimes some problems when importing VC9 projects, the custom build rules can somehow be mangled. If this happens to you (although AFAIK nobody reported it for wx 2.9.4 project files yet), just copy the custom build rules for setup.h manually or simply execute them yourself manually.

    FWIW we hope to have “native” VC10 and VC11 projects in 3.0 release (coming soon).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I cannot get GLEW to link correctly with my program. I have the path
I cannot get the DropDownHeight of the ComboBox set properly to display all the
Cannot get my head around the SQL that will return the number of times
I cannot get execv() to work in my C program. I suspect the problem
I cannot get this modal dialog to work property. Problem is that in a
I cannot get my Wordpress theme to randomise the posts I'm displaying in the
I cannot get my Spring web app to find my scripts. I have the
I cannot get this function to fire off... I'm thinking I need a fresh
I cannot get my SID working ... <?php session_start(); // Or maybe pass along
I cannot get Bindable LINQ to work with VB.NET for the life of me.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.