Visual Studio 2017 compiled program fails to run ( library program mismatch ) Topic is solved

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
katuday
Earned some good credits
Earned some good credits
Posts: 134
Joined: Fri Aug 17, 2012 2:22 am

Visual Studio 2017 compiled program fails to run ( library program mismatch )

Post by katuday »

Windows 7.
I have compiled the library ( static lib / static crt ) using Microsoft Visual Studio Community 2017 Version 15.4.5
Then I compiled my program (static crt ) using the same compiler.
When I launch the program I get the error:
Mismatch between the program and the library build versions detected.
The library used 3.1.0 ( wchar_t Visual C++ 1910, wx containers compatible with 3.0) and your program used ... Visual Studio 1911 ...
This can't be true. I am using the same compiler. What is going on?

Solved:
My tool set selection was set incorrectly
User avatar
eranon
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: Visual Studio 2017 compiled program fails to run ( library program mismatch )

Post by eranon »

I don't use Visual Studio (or rather I used it far in the past VC6), but it sounds like an ABI incompatibility. Looking here: https://blogs.msdn.microsoft.com/vcblog ... r-version/ I can see _MSC_VER 1910 & 1911 refer to different Visual Studio updates...
The Compiler Versioning Scheme

Each major release of the Visual C++ compiler increments the “hundreds” of _MSC_VER. Each update within a major release increments the “units” by 1. For example, in VS “15” Preview 5, the macro _MSC_VER evaluates to 1910. The next update will have _MSC_VER set to 1911.
Did you update Visual Studio and underlying toolchain between your building of wxWidgets and your app?

Also, you don't show the entire error message; maybe something useful in the missing parts.

And, of course, I assume you only have one wxWidgets on disk (I mean, you are sure about the provided search path when you're linking your app against wxWidgets).

--
EDIT: I see afterward you marked the thread as SOLVED.
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Post Reply