Mismatch between the program and library build versions detected. The library used 3.0 (wchar_t, Visual C++ 1900, wx containers, compatible with 2.8 and your program used 3.0 (wchar_t, Visual C++ 1915, wx containers, compatible with 2.8
Fatal Runtime Error: Mismatch between the program and library build versions detected. Topic is solved
Fatal Runtime Error: Mismatch between the program and library build versions detected.
Not sure how to resolve this runtime error, have tried updating library from 3.0.3 to 3.0.4 and rebuilding project but it didn't help.
wxWidgets(v3.2.2.1) - Vs2022(v143) - Win10(x64) - DialogBlocks(v5.16.5_Unicode)
Re: Fatal Runtime Error: Mismatch between the program and library build versions detected.
1900 = MSVC 2015 v14.0
1915 = MSVC 2017 v15.8
Assuming you really used the same compiler (MSVC 2017) for both the library and the application using it, make sure the platform toolset (in project settings, Configuration Properties / General) is also the same (e.g. v140 vs 141).
1915 = MSVC 2017 v15.8
Assuming you really used the same compiler (MSVC 2017) for both the library and the application using it, make sure the platform toolset (in project settings, Configuration Properties / General) is also the same (e.g. v140 vs 141).
Re: Fatal Runtime Error: Mismatch between the program and library build versions detected.
...doh! can't believe I missed that, I've not long moved from vs2015 to vs2017 and still have the old cmd shortcut lurking in my start menu.PB wrote: Assuming you really used the same compiler (MSVC 2017) for both the library and the application using it
wxWidgets(v3.2.2.1) - Vs2022(v143) - Win10(x64) - DialogBlocks(v5.16.5_Unicode)
-
- In need of some credit
- Posts: 5
- Joined: Mon Oct 28, 2019 6:30 pm
Re: Fatal Runtime Error: Mismatch between the program and library build versions detected.
I just had the same issue arise while trying to run the wxplplot example in plplot. I built the widgets and plplot libs/dlls with the exact same compiler as the example and there are no other widgets distributions on my computer. Could there be another cause and solution?
Re: Fatal Runtime Error: Mismatch between the program and library build versions detected.
The same type of problem happens when you use different compiler options. I forget which few options can cause this issue.drdrbergman wrote: ↑Mon Oct 28, 2019 6:33 pm I just had the same issue arise while trying to run the wxplplot example in plplot. I built the widgets and plplot libs/dlls with the exact same compiler as the example and there are no other widgets distributions on my computer. Could there be another cause and solution?
But, it would likely very per compiler.
Note: If you have the same exact error message you need to decide which compiler you want to use and fix the error message by using that compiler!
Tim S.
-
- In need of some credit
- Posts: 5
- Joined: Mon Oct 28, 2019 6:30 pm
Re: Fatal Runtime Error: Mismatch between the program and library build versions detected.
Thank you Tim. I suspected as much after reading a few stackoverflow and other blog posts. However, I just purged everything and did a clean rebuild of widgets and plplot this time making sure that the same SDk and compiler choice was made in all projects. I did have 2 SDK's and it seems that widgets and plplot had populated the projects with different choices (at least that is what seems to be the case). After the complete rebuild and install the same error came up (I compiled the test project with the same choices too).
As you can see the mismatch is not between two versions but between two different containers, wx and STL. My knowledge of some of these details is weak. Any suggestions?
As you can see the mismatch is not between two versions but between two different containers, wx and STL. My knowledge of some of these details is weak. Any suggestions?
Re: Fatal Runtime Error: Mismatch between the program and library build versions detected.
The "wx/stl containers" in the message refers to the "wxUSE_STD_CONTAINERS" #define in setup.h
This indicates that there are still two different configurations used when building the libs vs the app.
This indicates that there are still two different configurations used when building the libs vs the app.
Use the source, Luke!
-
- In need of some credit
- Posts: 5
- Joined: Mon Oct 28, 2019 6:30 pm
Re: Fatal Runtime Error: Mismatch between the program and library build versions detected.
What could be different if all things that I can control (or at least know about) are the same?
The SDK and compiler versions were identical. Is there some other setting that I could check, say preprocessor settings?
Any help would be appreciated.
The SDK and compiler versions were identical. Is there some other setting that I could check, say preprocessor settings?
Any help would be appreciated.
Re: Fatal Runtime Error: Mismatch between the program and library build versions detected.
Check the include paths to wxWidgets and preprocessor settings in both projects.
BTW: How exactly do you build both projects (wx libs and the sample)?
BTW: How exactly do you build both projects (wx libs and the sample)?
Use the source, Luke!
-
- In need of some credit
- Posts: 5
- Joined: Mon Oct 28, 2019 6:30 pm
Re: Fatal Runtime Error: Mismatch between the program and library build versions detected.
For widgets I use the VS sln that comes with it. Plplot build uses cmake then the install uses a VS sln.
I did catch a discrepancy between the SDK setting that was default setting in each a while back but that is fixed.
The example is from the plplot distribution but I did not build it with the rest of plplot. I made a new VS project and did a cut and paste.
I can get each to work on its own, and I've had a bit of trouble with the plplot install for a while but that is fixed too. Thanks for your advice. I'm pretty sure the include paths in my project are pointing to the correct but I'm not sure about the wx and pl builds or the preprocessor settings.
I did catch a discrepancy between the SDK setting that was default setting in each a while back but that is fixed.
The example is from the plplot distribution but I did not build it with the rest of plplot. I made a new VS project and did a cut and paste.
I can get each to work on its own, and I've had a bit of trouble with the plplot install for a while but that is fixed too. Thanks for your advice. I'm pretty sure the include paths in my project are pointing to the correct but I'm not sure about the wx and pl builds or the preprocessor settings.
Re: Fatal Runtime Error: Mismatch between the program and library build versions detected.
This error usually appears following a change or update to vs.
The solution for me is rebuild wxWidgets libraries via dev cmd:
cd /d %WXWIN%\build\msw
nmake /a makefile.vc
The solution for me is rebuild wxWidgets libraries via dev cmd:
cd /d %WXWIN%\build\msw
nmake /a makefile.vc
wxWidgets(v3.2.2.1) - Vs2022(v143) - Win10(x64) - DialogBlocks(v5.16.5_Unicode)