Warning: Mismatch between the program and library build versions detected.

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.
bgining2this
Knows some wx things
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.

Post by bgining2this » Thu Mar 11, 2021 1:23 am

Wow oneeyeman now all the errors are gone and i can see a codelite terminal saying "Hit a key to continue" i wonder what my little code is doing? this is supposed to be a MDI application...

bgining2this
Knows some wx things
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.

Post by bgining2this » Thu Mar 11, 2021 2:44 am

Hi,
Those are not compiler errors, but link errors.

You can uncomment all this code and it will still compile, but not link This is different.

Try to change you link options to be:
CODE: SELECT ALL

`wx-config --libs`
@DavidHart - will this work?

Thank you.
It throws more errors with that liker option we are back to the linker options i have posted

bgining2this
Knows some wx things
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.

Post by bgining2this » Thu Mar 11, 2021 2:57 am

Now i am the one that is confused :shock:

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 5224
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Warning: Mismatch between the program and library build versions detected.

Post by ONEEYEMAN » Thu Mar 11, 2021 3:05 am

Hi,
So you uncomment the code and got errors?
Can you post those errors?

Thank you

bgining2this
Knows some wx things
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.

Post by bgining2this » Thu Mar 11, 2021 3:57 am

Yes i have uncomment the code and now i am back to the 10 errors i posted back again in this thread, this are the errors

Code: Select all

/bin/sh -c '/usr/bin/make -j4 -e -f  Makefile'
----------Building project:[ DentalOrganizer - Debug ]----------
make[1]: Entering directory '/home/jorgecg/Documentos/ProyectosCodeliteywxWidgets/TheDentalOrganizer/DentalOrganizer'
/usr/bin/g++-6 -o ../build-Debug/bin/DentalOrganizer @../build-Debug/DentalOrganizer/ObjectsList.txt -L.   -L/usr/local/lib -pthread   -lwx_gtk2u_xrc-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
ld: ../build-Debug/DentalOrganizer/MainFrame.cpp.o:(.data.rel.ro._ZTV9MainFrame[_ZTV9MainFrame]+0x2c8): undefined reference to `wxWindowBase::GetDPI() const'
ld: ../build-Debug/DentalOrganizer/MainFrame.cpp.o:(.data.rel.ro._ZTV9MainFrame[_ZTV9MainFrame]+0x328): undefined reference to `wxTopLevelWindowGTK::GetDefaultAttributes() const'
ld: ../build-Debug/DentalOrganizer/MainFrame.cpp.o:(.data.rel.ro._ZTV9MainFrame[_ZTV9MainFrame]+0x450): undefined reference to `wxTopLevelWindowBase::Layout()'
ld: ../build-Debug/DentalOrganizer/MainFrame.cpp.o:(.data.rel.ro._ZTV20wxMDIParentFrameBase[_ZTV20wxMDIParentFrameBase]+0x2c8): undefined reference to `wxWindowBase::GetDPI() const'
ld: ../build-Debug/DentalOrganizer/MainFrame.cpp.o:(.data.rel.ro._ZTV20wxMDIParentFrameBase[_ZTV20wxMDIParentFrameBase]+0x328): undefined reference to `wxTopLevelWindowGTK::GetDefaultAttributes() const'
ld: ../build-Debug/DentalOrganizer/MainFrame.cpp.o:(.data.rel.ro._ZTV20wxMDIParentFrameBase[_ZTV20wxMDIParentFrameBase]+0x450): undefined reference to `wxTopLevelWindowBase::Layout()'
ld: ../build-Debug/DentalOrganizer/MainFrame.cpp.o:(.data.rel.ro._ZTV21wxMDIClientWindowBase[_ZTV21wxMDIClientWindowBase]+0x2c8): undefined reference to `wxWindowBase::GetDPI() const'
ld: ../build-Debug/DentalOrganizer/main.cpp.o:(.data.rel.ro._ZTV15wxTDIChildFrame[_ZTV15wxTDIChildFrame]+0x2c8): undefined reference to `wxWindowBase::GetDPI() const'
ld: ../build-Debug/DentalOrganizer/main.cpp.o:(.data.rel.ro._ZTV15wxTDIChildFrame[_ZTV15wxTDIChildFrame]+0x328): undefined reference to `wxTopLevelWindowGTK::GetDefaultAttributes() const'
ld: ../build-Debug/DentalOrganizer/main.cpp.o:(.data.rel.ro._ZTV15wxTDIChildFrame[_ZTV15wxTDIChildFrame]+0x450): undefined reference to `wxTopLevelWindowBase::Layout()'
ld: ../build-Debug/DentalOrganizer/main.cpp.o:(.data.rel.ro._ZTV19wxMDIChildFrameBase[_ZTV19wxMDIChildFrameBase]+0x2c8): undefined reference to `wxWindowBase::GetDPI() const'
ld: ../build-Debug/DentalOrganizer/main.cpp.o:(.data.rel.ro._ZTV19wxMDIChildFrameBase[_ZTV19wxMDIChildFrameBase]+0x328): undefined reference to `wxTopLevelWindowGTK::GetDefaultAttributes() const'
ld: ../build-Debug/DentalOrganizer/main.cpp.o:(.data.rel.ro._ZTV19wxMDIChildFrameBase[_ZTV19wxMDIChildFrameBase]+0x450): undefined reference to `wxTopLevelWindowBase::Layout()'
make[1]: *** [DentalOrganizer.mk:79: ../build-Debug/bin/DentalOrganizer] Error 1
make[1]: Leaving directory '/home/jorgecg/Documentos/ProyectosCodeliteywxWidgets/TheDentalOrganizer/DentalOrganizer'
make: *** [Makefile:5: All] Error 2
====13 errors, 0 warnings====

DavidHart
Site Admin
Site Admin
Posts: 4063
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Warning: Mismatch between the program and library build versions detected.

Post by DavidHart » Thu Mar 11, 2021 9:55 am

`wx-config --libs`
@DavidHart - will this work?
No, not in the CodeLite settings. It needs to be:
$(shell wx-config --libs <whatever>)
which does the same thing.

DavidHart
Site Admin
Site Admin
Posts: 4063
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Warning: Mismatch between the program and library build versions detected.

Post by DavidHart » Thu Mar 11, 2021 10:01 am

My actual project code i have post it above but here it is again,
It was not just the code that I asked for, but also an archive of the whole CodeLite Project.
I don't know where that is stored (probably /home/jorgecg/Documentos/ProyectosCodeliteywxWidgets/TheDentalOrganizer or nearby) but it will contain a file called <something>.project, probably 'TheDentalOrganizer.project'. Please create a tarball of that whole directory and attach it here.

bgining2this
Knows some wx things
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.

Post by bgining2this » Thu Mar 11, 2021 4:52 pm

Ok here it is the whole project but when i add a file as attachments, i get a error Error HTTP error. Thank you again

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 5224
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Warning: Mismatch between the program and library build versions detected.

Post by ONEEYEMAN » Thu Mar 11, 2021 4:56 pm

Hi,
What is the size of the project?
You need to do "make clean" to get rid of the build files and use only source/ttext files.

Thank you.

bgining2this
Knows some wx things
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.

Post by bgining2this » Thu Mar 11, 2021 6:20 pm

Here it is the code
Attachments
DentalOrganizer.zip
Project source
(428.83 KiB) Downloaded 56 times

DavidHart
Site Admin
Site Admin
Posts: 4063
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Warning: Mismatch between the program and library build versions detected.

Post by DavidHart » Thu Mar 11, 2021 9:25 pm

OK, I've altered your project settings. I've also altered the frame code to make it compiler and run.

I suggest you (extract and) add the attached tarball project and files to your workspace: select the workspace name in the Workspace View, right-click and 'Add an Existing Project'. Then check it builds and runs for you.

If so, you can start uncommenting your code, little by little, each time making sure that nothing breaks.
Attachments
DentalOrganizerNew.tar.gz
(449.54 KiB) Downloaded 47 times

bgining2this
Knows some wx things
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.

Post by bgining2this » Thu Mar 11, 2021 9:45 pm

Thank you now i can see finaly one of the frames, i will keep you informed on how the uncomment code goes !!

bgining2this
Knows some wx things
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.

Post by bgining2this » Fri Mar 12, 2021 11:21 pm

OK, I've altered your project settings. I've also altered the frame code to make it compiler and run.
Works great, would you please tell me which are the project settings you altered, so next time i can do it by myself ?

DavidHart
Site Admin
Site Admin
Posts: 4063
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Warning: Mismatch between the program and library build versions detected.

Post by DavidHart » Sat Mar 13, 2021 11:30 am

It's hard to know which of the changes were actually needed, but what I did was to create a new C++ project, check it worked, then merged the two until it built with your files.

I've attached a diff of the old/new DentalOrganizer.projects. Some bits (e.g. the qmake section) are almost certainly irrelevant. One that might be significant is that I changed the BuildSystem from "CodeLite Makefile Generator" to "Default". I did that because of the layout of my filesystem: my ~/devel/ dir, below which I do this sort of thing, is actually a symlink to a different disc that's mounted on /mnt/, and "CodeLite Makefile Generator" was generating paths like ./../../../../../foo/bar/baz.c :? . That was confusing, and might have made a real difference...

I noticed that your compiler settings called wx-config, but the linker settings still called /usr/local/wx-config! That is the likely cause of your original problem, the program/library mismatch.

I also noticed that your project created its binary outside the project dir, so I fixed that too.
Attachments
DOrg.diff
(4.08 KiB) Downloaded 49 times

Post Reply