LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Compiling wxWidgets on Ubuntu 9.04 (https://www.linuxquestions.org/questions/linux-newbie-8/compiling-wxwidgets-on-ubuntu-9-04-a-743426/)

windows22 07-28-2009 11:08 AM

Compiling wxWidgets on Ubuntu 9.04
 
Hi I did fine with Ubuntu 9.04 for a month and then things went wrong and I could no longer compile programs though others on the same distro could so I reinstalled Ubuntu 9.04. First step is to compile wxWidgets. Before this was automatic sudo make install libgtk2.0-dev, download wxGTK from wxWidgets then compile and make wxWidgets. Now I can't even do that, I get make errors every time and as soon as I resolve one. another shows. Widgets version 2-8-10 is the same as before. Does anyone know a current address for a tutorial getting widgets to compile with Ubuntu, I don't know whether to ask you, Ubuntu or Widgets (or understand what went wrong with Ubuntu in the first place.

Thanks

weibullguy 07-28-2009 11:32 AM

Might be easier to help if you posted the error message. It's likely something simple like a missing dev package on your system.

windows22 07-29-2009 02:55 AM

Quote:

Originally Posted by weibullguy (Post 3623147)
Might be easier to help if you posted the error message. It's likely something simple like a missing dev package on your system.

Thanks "libwx_baseu_xml-2.8" "undefined reference" appears many times. But only the wxGTK-dev package was needed first time I built on Widgets on Linux.

weibullguy 07-29-2009 04:40 AM

Well, that's not usually much information to go on. Generally, when you post the output of failed makes, its a good idea to post the last 20-30 lines of output. Sometimes even more depending on where the actual error occurs. In this case, you could have gone to this page and found that libwx_baseu_xml-2.8 is provided by the libwxbase package. Do you have that package and its associated -dev package installed?

linuxlover.chaitanya 07-29-2009 05:07 AM

Well in Ubuntu you usually need to install build-essential package to compile packages from source. Did you install that?
Just a thought though.

windows22 07-30-2009 11:46 PM

Hi

some make output below. Yes had libwxbase and dev package already.... running this from the directory I unpacked wxGTK to Desktop/wxGTK-2.8.10 (what I did before)

Thanks
Code:

make[1]: Entering directory `/home/gale/Desktop/wxGTK-2.8.10/utils/wxrc'
unsigned int)'
wxrc.cpp:(.text._ZN15XRCWndClassDataC1ERK8wxStringS2_PK9wxXmlNode[XRCWndClassData::XRCWndClassData(wxString const&, wxString const&, wxXmlNode const*)]+0x53e): undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'
wxrc.cpp:(.text._ZN15XRCWndClassDataC1ERK8wxStringS2_PK9wxXmlNode[XRCWndClassData::XRCWndClassData(wxString const&, wxString const&, wxXmlNode const*)]+0x5a5): undefined reference to `wxString::Cmp(char const*) const'
wxrc.cpp:(.text._ZN15XRCWndClassDataC1ERK8wxStringS2_PK9wxXmlNode[XRCWndClassData::XRCWndClassData(wxString const&, wxString const&, wxXmlNode const*)]+0x5dd): undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'
wxrc.cpp:(.text._ZN15XRCWndClassDataC1ERK8wxStringS2_PK9wxXmlNode[XRCWndClassData::XRCWndClassData(wxString const&, wxString const&, wxXmlNode const*)]+0x5f1): undefined reference to `wxStringHash::wxCharStringHash(char const*)'
wxrc.cpp:(.text._ZN15XRCWndClassDataC1ERK8wxStringS2_PK9wxXmlNode[XRCWndClassData::XRCWndClassData(wxString const&, wxString const&, wxXmlNode const*)]+0x771): undefined reference to `wxString::Cmp(char const*) const'
wxrc.cpp:(.text._ZN15XRCWndClassDataC1ERK8wxStringS2_PK9wxXmlNode[XRCWndClassData::XRCWndClassData(wxString const&, wxString const&, wxXmlNode const*)]+0x7aa): undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'
wxrc.cpp:(.text._ZN15XRCWndClassDataC1ERK8wxStringS2_PK9wxXmlNode[XRCWndClassData::XRCWndClassData(wxString const&, wxString const&, wxXmlNode const*)]+0x7be): undefined reference to `wxStringHash::wxCharStringHash(char const*)'
wxrc.cpp:(.text._ZN15XRCWndClassDataC1ERK8wxStringS2_PK9wxXmlNode[XRCWndClassData::XRCWndClassData(wxString const&, wxString const&, wxXmlNode const*)]+0x8ae): undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'
wxrc.cpp:(.text._ZN15XRCWndClassDataC1ERK8wxStringS2_PK9wxXmlNode[XRCWndClassData::XRCWndClassData(wxString const&, wxString const&, wxXmlNode const*)]+0x8c2): undefined reference to `wxStringHash::wxCharStringHash(char const*)'
wxrc_wxrc.o:(.rodata._ZTV9XmlResApp[vtable for XmlResApp]+0x44): undefined reference to `wxAppConsole::Initialize(int&, char**)'
/home/gale/Desktop/wxGTK-2.8.10/lib/libwx_base_xml-2.8.so: undefined reference to `wxString::CmpNoCase(char const*) const'
/home/gale/Desktop/wxGTK-2.8.10/lib/libwx_base_xml-2.8.so: undefined reference to `wxString::wxString(wchar_t const*, wxMBConv const&, unsigned int)'
/home/gale/Desktop/wxGTK-2.8.10/lib/libwx_base-2.8.so: undefined reference to `wx_regfree'
/home/gale/Desktop/wxGTK-2.8.10/lib/libwx_base-2.8.so: undefined reference to `wx_re_exec'
/home/gale/Desktop/wxGTK-2.8.10/lib/libwx_base_xml-2.8.so: undefined reference to `wxString::Find(char const*) const'
/home/gale/Desktop/wxGTK-2.8.10/lib/libwx_base_xml-2.8.so: undefined reference to `wxCSConv::wxCSConv(char const*)'
/home/gale/Desktop/wxGTK-2.8.10/lib/libwx_base-2.8.so: undefined reference to `wx_re_comp'
/home/gale/Desktop/wxGTK-2.8.10/lib/libwx_base-2.8.so: undefined reference to `wx_regerror'
/home/gale/Desktop/wxGTK-2.8.10/lib/libwx_base_xml-2.8.so: undefined reference to `wxString::BeforeFirst(char) const'
/home/gale/Desktop/wxGTK-2.8.10/lib/libwx_base_xml-2.8.so: undefined reference to `wxString::wc_str(wxMBConv const&) const'
collect2: ld returned 1 exit status
make[1]: *** [wxrc] Error 1
make[1]: Leaving directory `/home/gale/Desktop/wxGTK-2.8.10/utils/wxrc'
make: *** [wxrc] Error 2
gale@gale-desktop:~/Desktop/wxGTK-2.8.10$


windows22 07-31-2009 01:54 AM

It appears now the problem may have been that I had done sudo apt-get build-dep for the app I was wanting to build which depends on wxWidgets. When I compiled the app (after installing various libwx dev and dbg packages) it compiled without my having compiled wxWidgets. Does this make any sense, and what are dbg packages? I noticed the app was built with widgets 2.8.9 not the 2.8.10 I was trying to build. What would I do now to build the app with 2.8.10? I have almost no clue about paths on Linux as I know windows (as per username).


Thanks


All times are GMT -5. The time now is 04:05 AM.