How to change the build options under Linux?

Help
mspoerr
2009-05-12
2013-05-22
  • mspoerr
    mspoerr
    2009-05-12

    Hello,

    I have a simple question:
    How can I change the build options under Linux? I want to have a debug, ansi, static build of wxpropertygrid instead of release, unicode, shared.

    Thanks,
    /mspoerr

     
    • Jaakko Salli
      Jaakko Salli
      2009-05-13

      Assuming you are using wxPropertyGrid 1.4, you just define --with-wx-prefix=X when running ./configure, where X is location where your 'release, unicode, shared' wxWidgets has been installed. For info on other useful arguments, just type ./configure --help.

      Regards,
      Jaakko

       
    • mspoerr
      mspoerr
      2009-05-13

      Hi,

      thank you for the answer - yes I use wxPropertyGrid 1.4.4.

      After reading the configure help (thank you for the hint), I decided to use
      ./configure --disable-shared --enable-debug --disable-unicode

      But when including the lib ino my project, I get the following linker errors.

      Any idea what I make wrong?

      Thanks,
      /mspoerr

      class_settings.o: In function `CSettings':
      /home/mspoerr/wktools4/src/class_settings.cpp:13: undefined reference to `wxPropertyGridManager::wxPropertyGridManager(wxWindow*, int, wxPoint const&, wxSize const&, long, char const*)'
      /home/mspoerr/wktools4/src/class_settings.cpp:13: undefined reference to `wxPropertyGridManager::wxPropertyGridManager(wxWindow*, int, wxPoint const&, wxSize const&, long, char const*)'
      class_wkePropGrid.o: In function `CWkePropGrid':
      /home/mspoerr/wktools4/src/class_wkePropGrid.cpp:12: undefined reference to `wxPropertyGridManager::wxPropertyGridManager(wxWindow*, int, wxPoint const&, wxSize const&, long, char const*)'
      /home/mspoerr/wktools4/src/class_wkePropGrid.cpp:12: undefined reference to `wxPropertyGridManager::wxPropertyGridManager(wxWindow*, int, wxPoint const&, wxSize const&, long, char const*)'
      class_wknPropGrid.o: In function `CWknPropGrid':
      /home/mspoerr/wktools4/src/class_wknPropGrid.cpp:10: undefined reference to `wxPropertyGridManager::wxPropertyGridManager(wxWindow*, int, wxPoint const&, wxSize const&, long, char const*)'
      class_wknPropGrid.o:/home/mspoerr/wktools4/src/class_wknPropGrid.cpp:10: more undefined references to `wxPropertyGridManager::wxPropertyGridManager(wxWindow*, int, wxPoint const&, wxSize const&, long, char const*)' follow
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxStringBase::find(wchar_t const*, unsigned int, unsigned int) const'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxAtoi(wchar_t const*)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxString::Format(wchar_t const*, ...)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxLogError(wchar_t const*, ...)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxStringBase::resize(unsigned int, wchar_t)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxStringBase::ConcatSelf(unsigned int, wchar_t const*, unsigned int)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxVariant::wxVariant(wchar_t const*, wxString const&)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxString::CmpNoCase(wchar_t const*) const'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxString::Find(wchar_t, bool) const'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxStringHash::wxCharStringHash(wchar_t const*)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxSscanf(wchar_t const*, wchar_t const*, ...)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxWindow::ApplyToolTip(_GtkTooltips*, wchar_t const*)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxString::Cmp(wchar_t const*) const'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxClassInfo::FindClass(wchar_t const*)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxString::EndsWith(wchar_t const*, wxString*) const'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxDateTime::ParseFormat(wchar_t const*, wchar_t const*, wxDateTime const&)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `operator+(wxString const&, wchar_t const*)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxStringBase::rfind(wchar_t, unsigned int) const'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxStringBase::operator=(wchar_t const*)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxString::Find(wchar_t const*) const'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxStringBase::wxStringBase(unsigned int, wchar_t)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxColour::FromString(wchar_t const*)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxString::Printf(wchar_t const*, ...)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxStringBase::append(unsigned int, wchar_t)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `operator+(wchar_t const*, wxString const&)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxStringBase::InitWith(wchar_t const*, unsigned int, unsigned int)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxString::Replace(wchar_t const*, wchar_t const*, bool)'
      /usr/local/lib/libwxcode_gtk2d_propgrid-2.8.so: undefined reference to `wxDateTime::Format(wchar_t const*, wxDateTime::TimeZone const&) const'
      collect2: ld returned 1 exit status

       
      • Jaakko Salli
        Jaakko Salli
        2009-05-13

        You will probably still need to use --with-wx-prefix in order for the configure to find your wxWidgets installation (or rather to find the wx-config script that contains the necessary build options). If you only have one set of wxWidgets libraries installed, then of course this step is not necessary and you will also then automatically use the same settings which your wxWidgets library was built with. Overriding settings the way you did is not guaranteed to work. I have never tried it and never excepted it to work. Remember that the GNU build chain used on Unix systems is very different from the usual build systems used on Windows. In fact it is much more convenient after you get used to it.

        Also did you remember to run "sudo make install"? This is of course a necessary step when building both wxWidgets itself and any wxCode component such as wxPropertyGrid.

        Regards,
        Jaakko

         
    • mspoerr
      mspoerr
      2009-05-13

      do you have an example for "--with-wx-prefix=X"? My wxWidgets libs are all in /usr/lib/ directory. Do I have to specify the lib or the directory? I use Ubuntu 8.10 and installed wxWidgets with the synaptic packet manager.

      Thanks,
      mspoerr

      Fyi: When using the "./configure --disable-shared --enable-debug --disable-unicode" syntax, I get the following output:

      mspoerr@mspoerr-laptop:/usr/local/propgrid$ ./configure --disable-shared --enable-debug --disable-unicode
      checking build system type... i686-pc-linux-gnu
      checking host system type... i686-pc-linux-gnu
      checking target system type... i686-pc-linux-gnu
      checking for the --enable-debug option... yes
      checking for the --enable-unicode option... no
      checking for the --enable-shared option... no
      checking for the --with-toolkit option... will be automatically detected
      checking for the --with-wxshared option... will be automatically detected
      checking for the --with-wxversion option... will be automatically detected
      checking for gcc... gcc
      checking for C compiler default output file name... a.out
      checking whether the C compiler works... yes
      checking whether we are cross compiling... no
      checking for suffix of executables...
      checking for suffix of object files... o
      checking whether we are using the GNU C compiler... yes
      checking whether gcc accepts -g... yes
      checking for gcc option to accept ANSI C... none needed
      checking for g++... g++
      checking whether we are using the GNU C++ compiler... yes
      checking whether g++ accepts -g... yes
      checking for wx-config... /usr/bin/wx-config
      checking for wxWidgets version >= 2.6.1 (--debug=yes --unicode=no)... yes (version 2.8.9)
      checking for wxWidgets static library... no
      checking if wxWidgets was built in STATIC mode... no
      checking which wxWidgets toolkit was selected... gtk2
      checking for ranlib... ranlib
      checking for a BSD-compatible install... /usr/bin/install -c
      checking whether ln -s works... yes
      checking whether make sets $(MAKE)... yes
      checking for ar... ar
      checking for strip... strip
      checking for nm... nm
      checking if make is GNU make... yes
      checking for dependency tracking method... gcc
      configure: creating ./config.status
      config.status: creating Makefile

      ----------------------------------------------------------------
        Configuration for PROPGRID 1.4.4 successfully completed.
        Summary of main configuration settings for PROPGRID:
        - DEBUG build
        - ANSI mode
        - STATIC mode

        The wxWidgets build which will be used by PROPGRID 1.4.4
        has the following settings:
        - DEBUG build
        - ANSI mode
        - SHARED mode
        - VERSION: 2.8.9
        - PORT: gtk2

        Now, just run make.
      ----------------------------------------------------------------

      mspoerr@mspoerr-laptop:/usr/local/propgrid$

       
      • Jaakko Salli
        Jaakko Salli
        2009-05-14

        Well, it may be possible that options you are giving might work, but it really requires that you have a compatible wxWidgets library is installed somewhere, and that the /usr/bin/wx-config script is aware of this library. You can run "wx-config --list" to see all the wxWidgets libraries that this script is aware of.

        I should note at this point that I'm by far not an expert on the GNU build chain or wx-config, and have personally used just a small subset of possibilities that this system provides, and certainly not in the way you are trying to do ;). Still, I'm going to assume that this base /usr/bin/wx-config script is aware of any and all wxWidgets libraries that you have installed using apt.

        Regards,
        Jaakko

         
    • mspoerr
      mspoerr
      2009-05-14

      Hi Jaakko,

      thank you for your help. I am new to Linux and therefore clueless :(. When I do the "wx-config --list" I get the following output:

      mspoerr@mspoerr-laptop:/usr/bin$ wx-config --list

          Default config is gtk2-unicode-release-2.8

        Default config will be used for output

        Alternate matches:
          base-ansi-debug-2.8
          base-ansi-release-2.8
          base-unicode-debug-2.8
          base-unicode-release-2.8
          gtk2-ansi-debug-2.8
          gtk2-ansi-release-2.8
          gtk2-unicode-debug-2.8

      mspoerr@mspoerr-laptop:/usr/bin$

      When I use the "--with-wx-prefix" option with a wrong parameter, I get an error from your configure script, so I think the "./configure --disable-shared --enable-debug --disable-unicode " command works, because it finds the wxwidgets build. When entering the make command, I get lots of errors, but they are only for the propgridsample. And I get a lib...

      Thank you for your patience,
      /mspoerr

       
    • mspoerr
      mspoerr
      2009-05-14

      Hi again,

      I deleted everything and started from plain. Now it works.

      Thank you Jaako for your help!

      /mspoerr

       
    • mspoerr
      mspoerr
      2009-05-15

      Hi,

      I have one more question: When I get a .so file, it's a shared library, right? If this is the case, the static option does not work.
      I also have problems with release build of the library. The application compiles and links without problems, but I am unable to start. The error message I get is that thelib is a debug build, but a release build is required. But I have the release build of wxPropertyGrid (ANSI, static?)...

      Thanks,
      /mspoerr

       
    • Jaakko Salli
      Jaakko Salli
      2009-05-15

      Yes .so is a shared library, DLL equivalent of Linux. AFAIK most if not all libraries you get through apt are shared, and if you are trying to link wxPropertyGrid statically with your application while having shared wxWidgets lib, then at least I'm out of any helpful info. Many wxWidgets developers link their applications statically for better compatibility across Linux distributions, but of course they also build their wxWidgets libraries from sources, with --disable-shared option.

      Jaakko

       
      • mspoerr
        mspoerr
        2009-05-16

        Jaakko,

        thank you again. I will try to get a static wxwidgets build and try again with wxpropertygrid.

        /mspoerr

         
    • mspoerr
      mspoerr
      2009-05-24

      Hi again,

      I have now my own wxwidgets lib:
      mspoerr@mspoerr-laptop:~/wktools4/src$ wx-config --version
      2.8.10
      mspoerr@mspoerr-laptop:~/wktools4/src$ wx-config --list

          Default config is gtk2-ansi-release-static-2.8

        Default config will be used for output

        Alternate matches:
          gtk2-ansi-debug-static-2.8

      mspoerr@mspoerr-laptop:~/wktools4/src$

      -----------------------

      wxPropertyGrid still does not work. I get a lot of errors while building the sample:
      ----------------------------------------------------------------
        Configuration for PROPGRID 1.4.4 successfully completed.
        Summary of main configuration settings for PROPGRID:
        - RELEASE build
        - ANSI mode
        - STATIC mode

        The wxWidgets build which will be used by PROPGRID 1.4.4
        has the following settings:
        - RELEASE build
        - ANSI mode
        - STATIC mode
        - VERSION: 2.8.10
        - PORT: gtk2

        Now, just run make.
      ----------------------------------------------------------------
      mspoerr@mspoerr-laptop:~/Desktop/propgrid$ make
      /home/mspoerr/Desktop/propgrid/bk-deps g++ -c -o propgrid_lib_advprops.o -I./include -I/usr/local/lib/wx/include/gtk2-ansi-release-static-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -g -O2 -O2 ./src/advprops.cpp
      /home/mspoerr/Desktop/propgrid/bk-deps g++ -c -o propgrid_lib_editors.o -I./include -I/usr/local/lib/wx/include/gtk2-ansi-release-static-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -g -O2 -O2 ./src/editors.cpp
      /home/mspoerr/Desktop/propgrid/bk-deps g++ -c -o propgrid_lib_extras.o -I./include -I/usr/local/lib/wx/include/gtk2-ansi-release-static-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -g -O2 -O2 ./src/extras.cpp
      /home/mspoerr/Desktop/propgrid/bk-deps g++ -c -o propgrid_lib_manager.o -I./include -I/usr/local/lib/wx/include/gtk2-ansi-release-static-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -g -O2 -O2 ./src/manager.cpp
      /home/mspoerr/Desktop/propgrid/bk-deps g++ -c -o propgrid_lib_odcombo.o -I./include -I/usr/local/lib/wx/include/gtk2-ansi-release-static-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -g -O2 -O2 ./src/odcombo.cpp
      /home/mspoerr/Desktop/propgrid/bk-deps g++ -c -o propgrid_lib_propgrid.o -I./include -I/usr/local/lib/wx/include/gtk2-ansi-release-static-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -g -O2 -O2 ./src/propgrid.cpp
      /home/mspoerr/Desktop/propgrid/bk-deps g++ -c -o propgrid_lib_props.o -I./include -I/usr/local/lib/wx/include/gtk2-ansi-release-static-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -g -O2 -O2 ./src/props.cpp
      rm -f lib/libwxcode_gtk2_propgrid-2.8.a
      ar rcu lib/libwxcode_gtk2_propgrid-2.8.a propgrid_lib_advprops.o propgrid_lib_editors.o propgrid_lib_extras.o propgrid_lib_manager.o propgrid_lib_odcombo.o propgrid_lib_propgrid.o propgrid_lib_props.o
      ranlib lib/libwxcode_gtk2_propgrid-2.8.a
      /home/mspoerr/Desktop/propgrid/bk-deps g++ -c -o propgridsample_minimal.o -I./include -I/usr/local/lib/wx/include/gtk2-ansi-release-static-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -g -O2 -O2 ./samples/minimal.cpp
      /home/mspoerr/Desktop/propgrid/bk-deps g++ -c -o propgridsample_propgridsample.o -I./include -I/usr/local/lib/wx/include/gtk2-ansi-release-static-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -g -O2 -O2 ./samples/propgridsample.cpp
      /home/mspoerr/Desktop/propgrid/bk-deps g++ -c -o propgridsample_sampleprops.o -I./include -I/usr/local/lib/wx/include/gtk2-ansi-release-static-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -g -O2 -O2 ./samples/sampleprops.cpp
      /home/mspoerr/Desktop/propgrid/bk-deps g++ -c -o propgridsample_tests.o -I./include -I/usr/local/lib/wx/include/gtk2-ansi-release-static-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -g -O2 -O2 ./samples/tests.cpp
      /home/mspoerr/Desktop/propgrid/bk-deps g++ -c -o propgridsample_xh_propgrid.o -I./include -I/usr/local/lib/wx/include/gtk2-ansi-release-static-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -g -O2 -O2 ./src/xh_propgrid.cpp
      g++ -o samples/propgridsample propgridsample_minimal.o propgridsample_propgridsample.o propgridsample_sampleprops.o propgridsample_tests.o propgridsample_xh_propgrid.o  -L./lib  -L./lib     -lwxcode_gtk2_propgrid-2.8 -L/usr/local/lib -pthread   /usr/local/lib/libwx_base-2.8.a /usr/local/lib/libwx_gtk2_core-2.8.a /usr/local/lib/libwx_base_xml-2.8.a /usr/local/lib/libwx_gtk2_xrc-2.8.a /usr/local/lib/libwx_gtk2_adv-2.8.a -lwxtiff-2.8 -lwxjpeg-2.8 -ldl -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lgio-2.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lXinerama -lSM -lpng -lz -lexpat
      /usr/local/lib/libwx_gtk2_core-2.8.a(corelib_gtk_dataobj.o): In function `wxBitmapDataObject::DoConvertToPng()':
      dataobj.cpp:(.text+0x17f): undefined reference to `wxMemoryOutputStream::wxMemoryOutputStream(void*, unsigned int)'
      dataobj.cpp:(.text+0x19e): undefined reference to `wxMemoryOutputStream::~wxMemoryOutputStream()'
      dataobj.cpp:(.text+0x1fd): undefined reference to `wxMemoryOutputStream::~wxMemoryOutputStream()'
      /usr/local/lib/libwx_gtk2_core-2.8.a(corelib_gtk_dataobj.o): In function `wxBitmapDataObject::SetData(unsigned int, void const*)':
      dataobj.cpp:(.text+0x2b9): undefined reference to `wxMemoryInputStream::wxMemoryInputStream(void const*, unsigned int)'
      dataobj.cpp:(.text+0x35a): undefined reference to `wxMemoryInputStream::~wxMemoryInputStream()'
      dataobj.cpp:(.text+0x392): undefined reference to `wxMemoryInputStream::~wxMemoryInputStream()'
      /usr/local/lib/libwx_gtk2_core-2.8.a(corelib_gtk_window.o): In function `wxWindow::GtkSendPaintEvents()':
      window.cpp:(.text+0x768e): undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
      /usr/local/lib/libwx_gtk2_core-2.8.a(corelib_gtk_control.o): In function `wxGtkFixSensitivity(wxWindow*)':
      control.cpp:(.text+0x851): undefined reference to `wxSystemOptions::GetOptionInt(wxString const&)'
      /usr/local/lib/libwx_gtk2_core-2.8.a(corelib_rendcmn.o): In function `wxRendererNative::Load(wxString const&)':
      rendcmn.cpp:(.text+0x222): undefined reference to `wxDynamicLibrary::CanonicalizePluginName(wxString const&, wxPluginCategory)'
      rendcmn.cpp:(.text+0x243): undefined reference to `wxDynamicLibrary::Load(wxString const&, int)'
      rendcmn.cpp:(.text+0x286): undefined reference to `wxDynamicLibrary::GetSymbol(wxString const&, bool*) const'
      rendcmn.cpp:(.text+0x345): undefined reference to `wxDynamicLibrary::Unload(void*)'
      rendcmn.cpp:(.text+0x3ef): undefined reference to `wxDynamicLibrary::Unload(void*)'
      ......
      ......
      /usr/local/lib/libwx_gtk2_core-2.8.a(corelib_sizer.o):(.rodata._ZTV16wxStaticBoxSizer[vtable for wxStaticBoxSizer]+0x7c): undefined reference to `wxClientDataContainer::DoSetClientObject(wxClientData*)'
      /usr/local/lib/libwx_gtk2_core-2.8.a(corelib_sizer.o):(.rodata._ZTV16wxStaticBoxSizer[vtable for wxStaticBoxSizer]+0x80): undefined reference to `wxClientDataContainer::DoGetClientObject() const'
      /usr/local/lib/libwx_gtk2_core-2.8.a(corelib_sizer.o):(.rodata._ZTV16wxStaticBoxSizer[vtable for wxStaticBoxSizer]+0x84): undefined reference to `wxClientDataContainer::DoSetClientData(void*)'
      ......
      ......
      collect2: ld gab 1 als Ende-Status zurück
      make: *** [samples/propgridsample] Fehler 1

      mspoerr@mspoerr-laptop:~/Desktop/propgrid$ sudo make install
      [sudo] password for mspoerr:
      g++ -o samples/propgridsample propgridsample_minimal.o propgridsample_propgridsample.o propgridsample_sampleprops.o propgridsample_tests.o propgridsample_xh_propgrid.o  -L./lib  -L./lib     -lwxcode_gtk2_propgrid-2.8 -L/usr/local/lib -pthread   /usr/local/lib/libwx_base-2.8.a /usr/local/lib/libwx_gtk2_core-2.8.a /usr/local/lib/libwx_base_xml-2.8.a /usr/local/lib/libwx_gtk2_xrc-2.8.a /usr/local/lib/libwx_gtk2_adv-2.8.a -lwxtiff-2.8 -lwxjpeg-2.8 -ldl -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lgio-2.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lXinerama -lSM -lpng -lz -lexpat
      /usr/local/lib/libwx_gtk2_core-2.8.a(corelib_gtk_dataobj.o): In function `wxBitmapDataObject::DoConvertToPng()':
      dataobj.cpp:(.text+0x17f): undefined reference to `wxMemoryOutputStream::wxMemoryOutputStream(void*, unsigned int)'
      dataobj.cpp:(.text+0x19e): undefined reference to `wxMemoryOutputStream::~wxMemoryOutputStream()'
      dataobj.cpp:(.text+0x1fd): undefined reference to `wxMemoryOutputStream::~wxMemoryOutputStream()'
      /usr/local/lib/libwx_gtk2_core-2.8.a(corelib_gtk_dataobj.o): In function `wxBitmapDataObject::SetData(unsigned int, void const*)':
      dataobj.cpp:(.text+0x2b9): undefined reference to `wxMemoryInputStream::wxMemoryInputStream(void const*, unsigned int)'
      dataobj.cpp:(.text+0x35a): undefined reference to `wxMemoryInputStream::~wxMemoryInputStream()'
      dataobj.cpp:(.text+0x392): undefined reference to `wxMemoryInputStream::~wxMemoryInputStream()'
      ......
      ......
      collect2: ld gab 1 als Ende-Status zurück
      make: *** [samples/propgridsample] Fehler 1
      mspoerr@mspoerr-laptop:~/Desktop/propgrid$

      In my application I get the following errors when linking to libwxcode_gtk2_propgrid-2.8.a

      linking wktools4 (g++)
      linking wktools4 (g++)
      /home/mspoerr/Desktop/propgrid/lib/libwxcode_gtk2_propgrid-2.8.a(propgrid_lib_advprops.o): In function `wxPGDatePickerCtrlEditor::OnEvent(wxPropertyGrid*, wxPGProperty*, wxWindow*, wxEvent&) const':
      /home/mspoerr/Desktop/propgrid/./src/advprops.cpp:531: undefined reference to `wxEVT_DATE_CHANGED'
      /home/mspoerr/Desktop/propgrid/lib/libwxcode_gtk2_propgrid-2.8.a(propgrid_lib_advprops.o): In function `wxPGSpinCtrlEditor::CreateControls(wxPropertyGrid*, wxPGProperty*, wxPoint const&, wxSize const&) const':
      /home/mspoerr/Desktop/propgrid/./src/advprops.cpp:275: undefined reference to `wxSpinButton::wxSpinButton()'
      /home/mspoerr/Desktop/propgrid/./src/advprops.cpp:281: undefined reference to `wxSpinButton::Create(wxWindow*, int, wxPoint const&, wxSize const&, long, wxString const&)'
      /home/mspoerr/Desktop/propgrid/lib/libwxcode_gtk2_propgrid-2.8.a(propgrid_lib_advprops.o): In function `wxDatePickerCtrlGeneric':
      /usr/local/include/wx-2.8/wx/generic/datectrl.h:25: undefined reference to `vtable for wxDatePickerCtrlGeneric'
      /usr/local/include/wx-2.8/wx/generic/datectrl.h:25: undefined reference to `wxDatePickerCtrlGeneric::Init()'
      ......
      ......
      /home/mspoerr/Desktop/propgrid/lib/libwxcode_gtk2_propgrid-2.8.a(propgrid_lib_editors.o):(.rodata._ZTI12wxPGComboBox[typeinfo for wxPGComboBox]+0x8): undefined reference to `typeinfo for wxOwnerDrawnComboBox'
      /home/mspoerr/Desktop/propgrid/lib/libwxcode_gtk2_propgrid-2.8.a(propgrid_lib_propgrid.o): In function `wxPropertyGrid::OnMouseCommon(wxMouseEvent&, int*, int*)':
      /home/mspoerr/Desktop/propgrid/./src/propgrid.cpp:7643: undefined reference to `wxOwnerDrawnComboBox::ms_classInfo'
      /home/mspoerr/Desktop/propgrid/lib/libwxcode_gtk2_propgrid-2.8.a(propgrid_lib_propgrid.o): In function `wxPropertyGrid::DoEditorValidate()':
      /home/mspoerr/Desktop/propgrid/./src/propgrid.cpp:6023: undefined reference to `wxOwnerDrawnComboBox::ms_classInfo'
      /home/mspoerr/Desktop/propgrid/lib/libwxcode_gtk2_propgrid-2.8.a(propgrid_lib_propgrid.o): In function `wxPropertyGrid::OnNavigationKey(wxNavigationKeyEvent&)':
      /home/mspoerr/Desktop/propgrid/./src/propgrid.cpp:8248: undefined reference to `wxOwnerDrawnComboBox::ms_classInfo'
      /home/mspoerr/Desktop/propgrid/lib/libwxcode_gtk2_propgrid-2.8.a(propgrid_lib_props.o): In function `wxDirProperty::OnButtonClick(wxPropertyGrid*, wxString&)':
      /home/mspoerr/Desktop/propgrid/./src/props.cpp:1726: undefined reference to `wxDirDialog::wxDirDialog(wxWindow*, wxString const&, wxString const&, long, wxPoint const&, wxSize const&, wxString const&)'
      /home/mspoerr/Desktop/propgrid/./src/props.cpp:1732: undefined reference to `wxDirDialog::ShowModal()'
      /home/mspoerr/Desktop/propgrid/./src/props.cpp:1734: undefined reference to `wxDirDialog::GetPath() const'
      collect2: ld returned 1 exit status
      make[2]: *** [wktools4] Error 1
      make[1]: *** [all-recursive] Error 1
      make: *** [all] Error 2
      *** Exited with status: 2 ***

      Thanks,
      mspoerr

       
      • Jaakko Salli
        Jaakko Salli
        2009-05-26

        Just to make sure, I need to ask if you really run

        "sudo make install" and "ldconfig"

        after completing the wxWidgets build?

        Regards,
        Jaakko

         
        • mspoerr
          mspoerr
          2009-05-26

          yes, I do. I am able to build all wxWidgets samples without problems.

          Thanks,
          /mspoerr

           
          • Jaakko Salli
            Jaakko Salli
            2009-05-26

            Unfortunately being able to build the wxWidgets samples is not exactly the same thing, as building them does not require the install step (in other words, building the samples will automatically seek the library files in appropriate source tree sub-directories).

            Right now I don't have any helpful ideas. I think this is the first time someone has noted a problem with the basic wxPG/wxCode build system on Linux. Anyhow, I will let you know if I think of something.

            You could try reading the install and build docs in the wxWidgets/docs dir and try to build a small "independent" app using your custom static ansi release build. Whether that works or not may lead to further clues.

            Regards,
            Jaakko

             
            • mspoerr
              mspoerr
              2009-05-26

              building a test app with the static wxwidgets lib works.

              Thanks,
              mspoerr

               
              • mspoerr
                mspoerr
                2009-05-31

                Hi Jaakko,

                do you have any last suggestion? If not, where else could I get help for this problem?

                Thanks,
                mspoerr

                 
                • Jaakko Salli
                  Jaakko Salli
                  2009-05-31

                  Instead of --disable-shared etc, you can try that

                  ./configure --with-wx-prefix=X

                  where X is where your custom static build installed, or you can try --with-wx-config=X where the wx-config of your static build is.

                  Personally, I have just always used ./configure --with-wx-prefix=X and that has worked for me.

                  I think additional help could be found on the wxCode mailing list. Even though wxPropertyGrid is not a wxCode component per se, it still does use their build system (as I probably mentioned already).

                  HTH,
                  Jaakko

                   
                  • mspoerr
                    mspoerr
                    2009-05-31

                    Hi Jaakko,

                    thank you for your patience. I tried again with the suggested options, but it does not work. I will try the wxCode Mailinglist.

                    Regards,
                    Mathias

                     
                    • mspoerr
                      mspoerr
                      2009-06-02

                      Hi again,

                      I now have a solution for the problem: The link order of the libs was wrong. First I included the propgrid lib to the LDADD option in kdevelop and now i moved it to the front of LDFLAGS.
                      Also refer to http://groups.google.com/group/comp.soft-sys.wxwindows/browse_thread/thread/7879a42efc063bb0#

                      Thank you again for your help, Jaakko!
                      Regards,
                      Mathias

                       
                      • Jaakko Salli
                        Jaakko Salli
                        2009-06-02

                        Right, as I replied in another message on the same mailing list, I could reproduce the sample-not-building issue with static build. Order of libraries in Makefile was wrong, but I cannot fully say right now if it is a mistake in my bakefile or in the Bakefile or in wxCode bkl presets.

                        I'll try to find a workaround if a real fix is not found.

                        Thanks for reporting the problem.

                        Jaakko

                         
              • mspoerr
                mspoerr
                2009-05-31

                Hi Jaakko,

                do you have any last suggestion? If not, where else could I get help for this problem?

                Thanks,
                mspoerr