Warning: Mismatch between the program and library build versions detected.
-
- Knows some wx things
- Posts: 29
- Joined: Wed Mar 03, 2021 9:24 pm
Warning: Mismatch between the program and library build versions detected.
Hello community.-
I am compiling a wxwidgets app with CodeLite ide and wxcraft, it is a MDI application, but when i build it this error is shown.-
./DentalOrganizer
15:16:41: Warning: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1014,wx containers,compatible with 2.,
and your program used 3.0 (wchar_t,compiler with C++ ABI 1010,wx containers,compatible with 2..
I had different versions os wxWidgets in the past but i have deleted one of them and developing on version 3, i use Arch Linux, any help is appreciated and thanks!!
I am compiling a wxwidgets app with CodeLite ide and wxcraft, it is a MDI application, but when i build it this error is shown.-
./DentalOrganizer
15:16:41: Warning: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1014,wx containers,compatible with 2.,
and your program used 3.0 (wchar_t,compiler with C++ ABI 1010,wx containers,compatible with 2..
I had different versions os wxWidgets in the past but i have deleted one of them and developing on version 3, i use Arch Linux, any help is appreciated and thanks!!
Re: Warning: Mismatch between the program and library build versions detected.
Hi,
What are your project's compiler and linker settings? In particular, do they contain 'wx-config --<whatever>' or '/path/to/wx-config --<whatever>'?
What is the result of doing, in a terminal:
Regards,
David
What are your project's compiler and linker settings? In particular, do they contain 'wx-config --<whatever>' or '/path/to/wx-config --<whatever>'?
What is the result of doing, in a terminal:
Code: Select all
wx-config --list
wx-config --cxxflags
wx-config --libs all
David
-
- Knows some wx things
- Posts: 29
- Joined: Wed Mar 03, 2021 9:24 pm
Re: Warning: Mismatch between the program and library build versions detected.
The compiler and linker settings are the default of codelite here it is the output of the 3 commands you asked
As you can see in the output of this commands im using version 3.1 of wxwidgets for what i can see, thank you for the help
Code: Select all
wx-config --list
Default config is gtk2-unicode-3.1
Default config will be used for output
Code: Select all
wx-config --cxxflags
-I/usr/local/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread
Code: Select all
wx-config --libs all
-L/usr/local/lib -pthread -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_webview-3.1 -lwx_gtk2u_stc-3.1 -lwx_gtk2u_richtext-3.1 -lwx_gtk2u_ribbon-3.1 -lwx_gtk2u_propgrid-3.1 -lwx_gtk2u_aui-3.1 -lwx_gtk2u_gl-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1
Re: Warning: Mismatch between the program and library build versions detected.
The wx-config output looks sane, and gives no reason to suppose that multiple wx versions are currently installed. However, where did that wx3.1 build come from? Did you self-build, or is it from Arch?
And did you ever have >1 wx3.1 build installed to /usr/local? If so, there might still be stale libs there. Or even stale headers: a search result implied that using the wrong /usr/include/wx-* (or, in your case, /usr/local/include/wx-* too) would cause this warning.
That would also explain why the warning message says "...used 3.0" rather than 3.1.
And if you've not already fixed the problem, I suggest you try adding a new C++ 'GUI with wxWidgets and wxCrafter' project to your workspace, and see if building that gives the same result.
And did you ever have >1 wx3.1 build installed to /usr/local? If so, there might still be stale libs there. Or even stale headers: a search result implied that using the wrong /usr/include/wx-* (or, in your case, /usr/local/include/wx-* too) would cause this warning.
That would also explain why the warning message says "...used 3.0" rather than 3.1.
Codelite has different types of project, though, and they don't all use wxWidgets. Please tell us what your entries are.The compiler and linker settings are the default of codelite
And if you've not already fixed the problem, I suggest you try adding a new C++ 'GUI with wxWidgets and wxCrafter' project to your workspace, and see if building that gives the same result.
Re: Warning: Mismatch between the program and library build versions detected.
What does these three commands return?
Tim S.
Code: Select all
pacman -Q wxgtk-common
pacman -Q wxgtk2
pacman -Q wxgtk3
-
- Knows some wx things
- Posts: 29
- Joined: Wed Mar 03, 2021 9:24 pm
Re: Warning: Mismatch between the program and library build versions detected.
This is the output for those commands.-
Yes i had created the project like a wxwidgets and wxCrafter solution thank you
Code: Select all
✝ ~ pacman -Q wxgtk-common
wxgtk-common 3.0.5.1-2
✝ ~ pacman -Q wxgtk2
wxgtk2 3.0.5.1-2
✝ ~ pacman -Q wxgtk3
wxgtk3 3.0.5.1-2
✝ ~
Re: Warning: Mismatch between the program and library build versions detected.
So you do have wx3.0.5 libs on your system, and presumably they are being found by the linker when your project is being built.pacman -Q wxgtk-common
wxgtk-common 3.0.5.1-2
pacman -Q wxgtk2
wxgtk2 3.0.5.1-2
pacman -Q wxgtk3
wxgtk3 3.0.5.1-2
Solutions include:
1) Remove those packages. However other wx programs may depend on them...
2)Fix your Project's Linker Settings. You still haven't revealed what they are, but I suspect you'll find that you can fix the problem by using something like:
Linker Options: $(shell /usr/local/bin/wx-config --libs --unicode=yes)
or alternatively by putting something sensible into the 'Libraries Search Path' field.
-
- Knows some wx things
- Posts: 29
- Joined: Wed Mar 03, 2021 9:24 pm
Re: Warning: Mismatch between the program and library build versions detected.
Same thing David, same error/warning shows and i cant see the two frames i have created, i compile fine, but i cant see any frame when i execute the program, thank you
Re: Warning: Mismatch between the program and library build versions detected.
What did you do? Remove the wx3.0 packages? Enter that Linker setting? Fill the Libraries Search Path field? Or all three?
Re: Warning: Mismatch between the program and library build versions detected.
Hi,
Can you compile and run "minimal" sample provided by the library?
If you are - make sure that the command used to compile it is the same as the command inside the IDE...
Thank you.
Can you compile and run "minimal" sample provided by the library?
If you are - make sure that the command used to compile it is the same as the command inside the IDE...
Thank you.
-
- Knows some wx things
- Posts: 29
- Joined: Wed Mar 03, 2021 9:24 pm
Re: Warning: Mismatch between the program and library build versions detected.
if i remove the packages i wouldnt be able to open CodeLite, i have modified the Linker settings, the error is still showing, and i cant also see my 2 windows i have created
Re: Warning: Mismatch between the program and library build versions detected.
Ah. You presumably have the CodeLite Arch package installed.if i remove the packages i wouldnt be able to open CodeLite
I don't use Arch, so I can't guess what Arch-specific things might be going wrong. A fix for one possible cause would be to re-install your wx3.1, this time to /usr/ instead of /usr/local. You can do that by adding --prefix=/usr to your configure line. That makes it more likely that the correct wx-config will be found. However that's only a guess, without enough information about your settings or being able to test things here.
Perhaps an Arch forum...
Re: Warning: Mismatch between the program and library build versions detected.
Hi,
Or you can try to set the absolute path to wx-config (as a test).
Thank you.
Or you can try to set the absolute path to wx-config (as a test).
Thank you.
-
- Knows some wx things
- Posts: 29
- Joined: Wed Mar 03, 2021 9:24 pm
Re: Warning: Mismatch between the program and library build versions detected.
I did it, now everything is fine, i have uninstalled everything and installed version 3.1 (all the dev ones), and in order for codelite to work the package named lib32-wxgtk3 so now i have the last version and codelite works ok. The compiler throwed me 10 errors or more, can you help me with those or i need to open a new thread ?
Re: Warning: Mismatch between the program and library build versions detected.
Hi,
1. So is everything works or you still have errors?
2. If you do have errors:
2a do they come from building CodeLite or your own code?
2b. what are those errors?
Thank you.
1. So is everything works or you still have errors?
2. If you do have errors:
2a do they come from building CodeLite or your own code?
2b. what are those errors?
Thank you.