Universite-Gustave-Eiffel / I-Simpa

An Open Source software for 3D sound propagation modelling
https://i-simpa.univ-gustave-eiffel.fr/
GNU General Public License v3.0
238 stars 57 forks source link

Linker error when building on Linux #186

Closed mattosborn closed 5 years ago

mattosborn commented 7 years ago

Any idea on the cause of this linker error when building on Linux?

CMakeFiles/isimpa.dir/IHM/GabeDataGrid.cpp.o:(.rodata._ZTV12GabeDataGrid[_ZTV12GabeDataGrid]+0x720): undefined reference to `non-virtual thunk to wxGrid::GetSizeAvailableForScrollTarget(wxSize const&)'
CMakeFiles/isimpa.dir/IHM/MainPropGrid.cpp.o:(.rodata._ZTV12MainPropGrid[_ZTV12MainPropGrid]+0x720): undefined reference to `non-virtual thunk to wxGrid::GetSizeAvailableForScrollTarget(wxSize const&)'
CMakeFiles/isimpa.dir/IHM/PropGrid.cpp.o:(.rodata._ZTV8PropGrid[_ZTV8PropGrid]+0x720): undefined reference to `non-virtual thunk to wxGrid::GetSizeAvailableForScrollTarget(wxSize const&)'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x800): undefined reference to `non-virtual thunk to wxTextCtrlBase::overflow(int)'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x828): undefined reference to `non-virtual thunk to wxTextCtrl::GetLineLength(long) const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x830): undefined reference to `non-virtual thunk to wxTextCtrl::GetLineText(long) const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x838): undefined reference to `non-virtual thunk to wxTextCtrl::GetNumberOfLines() const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x840): undefined reference to `non-virtual thunk to wxTextCtrl::IsModified() const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x848): undefined reference to `non-virtual thunk to wxTextCtrl::MarkDirty()'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x850): undefined reference to `non-virtual thunk to wxTextCtrl::DiscardEdits()'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x858): undefined reference to `non-virtual thunk to wxTextCtrl::SetStyle(long, long, wxTextAttr const&)'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x860): undefined reference to `non-virtual thunk to wxTextCtrl::GetStyle(long, wxTextAttr&)'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x868): undefined reference to `non-virtual thunk to wxTextCtrlBase::SetDefaultStyle(wxTextAttr const&)'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x878): undefined reference to `non-virtual thunk to wxTextCtrl::XYToPosition(long, long) const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x880): undefined reference to `non-virtual thunk to wxTextCtrl::PositionToXY(long, long*, long*) const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x888): undefined reference to `non-virtual thunk to wxTextCtrl::ShowPosition(long)'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x890): undefined reference to `non-virtual thunk to wxTextCtrl::HitTest(wxPoint const&, long*) const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x8a0): undefined reference to `non-virtual thunk to wxTextCtrl::GetValue() const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x8c8): undefined reference to `non-virtual thunk to wxTextCtrl::DoPositionToCoords(long) const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x900): undefined reference to `non-virtual thunk to wxTextCtrl::WriteText(wxString const&)'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x910): undefined reference to `non-virtual thunk to wxTextCtrl::GetValue() const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x928): undefined reference to `non-virtual thunk to wxTextCtrl::Remove(long, long)'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x938): undefined reference to `non-virtual thunk to wxTextCtrl::Copy()'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x940): undefined reference to `non-virtual thunk to wxTextCtrl::Cut()'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x948): undefined reference to `non-virtual thunk to wxTextCtrl::Paste()'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x988): undefined reference to `non-virtual thunk to wxTextCtrl::SetInsertionPoint(long)'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x998): undefined reference to `non-virtual thunk to wxTextCtrl::GetInsertionPoint() const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x9a0): undefined reference to `non-virtual thunk to wxTextCtrl::GetLastPosition() const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x9a8): undefined reference to `non-virtual thunk to wxTextCtrl::SetSelection(long, long)'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x9c0): undefined reference to `non-virtual thunk to wxTextCtrl::GetSelection(long*, long*) const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x9d0): undefined reference to `non-virtual thunk to wxTextCtrl::IsEditable() const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0x9d8): undefined reference to `non-virtual thunk to wxTextCtrl::SetEditable(bool)'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0xa00): undefined reference to `non-virtual thunk to wxTextCtrl::DoSetValue(wxString const&, int)'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0xa08): undefined reference to `non-virtual thunk to wxTextCtrl::DoGetValue() const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0xa40): undefined reference to `non-virtual thunk to wxTextCtrl::EnableTextChangedEvents(bool)'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0xa48): undefined reference to `non-virtual thunk to wxTextCtrl::GTKIMFilterKeypress(_GdkEventKey*) const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0xa50): undefined reference to `non-virtual thunk to wxTextCtrl::GetEditable() const'
CMakeFiles/isimpa.dir/IHM/pyConsole.cpp.o:(.rodata._ZTV9PyConsole[_ZTV9PyConsole]+0xa58): undefined reference to `non-virtual thunk to wxTextCtrl::GetEntry() const'
collect2: error: ld returned 1 exit status
nicolas-f commented 7 years ago

Hi,

You have issue with wxWidgets linking. Do you build wxWidgets yourself ?

The travis script build it with this commands: https://github.com/Ifsttar/I-Simpa/blob/master/ci/travis/linux/before_install.sh

mattosborn commented 7 years ago

I've tried building and configuring in various ways, including the method in the travis scripts, but same error.

nicolas-f commented 7 years ago

Please check that cmake is using the good wxwidgets build/libs path.

You can view it in the file CMakeCache.txt

mattosborn commented 7 years ago

There are a bunch of references to my wxWidgets make install target which all look correct to me, including something that looks a bit like a compiler flag to add the static libraries:

FIND_PACKAGE_MESSAGE_DETAILS_wxWidgets:INTERNAL=[-L/home/matto/progs/wxWidgets-install/lib;-pthread;;;/home/matto/progs/wxWidgets-install/lib/libwx_gtk3u_gl-3.1.a;/home/matto/progs/wxWidgets-install/lib/libwx_gtk3u_aui-3.1.a;/home/matto/progs/wxWidgets-install/lib/libwx_gtk3u_html-3.1.a;/home/matto/progs/wxWidgets-install/lib/libwx_gtk3u_adv-3.1.a;/home/matto/progs/wxWidgets-install/lib/libwx_gtk3u_core-3.1.a;/home/matto/progs/wxWidgets-install/lib/libwx_baseu_xml-3.1.a;/home/matto/progs/wxWidgets-install/lib/libwx_baseu-3.1.a;-lGL;-lGLU;-lgthread-2.0;-pthread;-lX11;-lXxf86vm;-lSM;-lgtk-3;-lgdk-3;-lpangocairo-1.0;-lpango-1.0;-latk-1.0;-lcairo-gobject;-lcairo;-lgdk_pixbuf-2.0;-lgio-2.0;-lgobject-2.0;-lglib-2.0;-lpng;-ljpeg;-lexpat;-lwxregexu-3.1;-lwxtiff-3.1;-lz;-ldl;-lm][/home/matto/progs/wxWidgets-install/lib/wx/include/gtk3-unicode-static-3.1;/home/matto/progs/wxWidgets-install/include/wx-3.1][v3.1.0()]