Author Topic: Linker Errors when linking libcodeblocks.so on Linux  (Read 3379 times)

Serioux

  • Guest
Linker Errors when linking libcodeblocks.so on Linux
« on: August 16, 2010, 10:04:42 am »
Good morning,

after quite some time I wanted to update my old SVN Codeblocks version (r5xxx :P). I updated the repository yesterday and it is now r6486.
I also downloaded the sources of wxWidgets 2.8.11 and successfully compiled and installed them.

I ./bootstrap'ed passed no extra flags to ./configure and ran make.
In the linking phase it throws the following erros (including the link command):
libtool: link: g++ -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -o .libs/codeblocks app.o appglobals.o compilersettingsdlg.o crashhandler.o dlgabout.o dlgaboutplugin.o environmentsettingsdlg.o infopane.o main.o notebookstyles.o prefix.o printdlg.o scriptconsole.o scriptingsettingsdlg.o splashscreen.o startherepage.o switcherdlg.o -pthread  -L/home/gregor/.setups/codeblocks/src/sdk /home/gregor/.setups/codeblocks/src/sdk/.libs/libcodeblocks.so -L/usr/local/lib -L/usr/lib64 -lwx_gtk2_richtext-2.8 -lwx_gtk2_aui-2.8 -lwx_gtk2_xrc-2.8 -lwx_gtk2_qa-2.8 -lwx_gtk2_html-2.8 -lwx_gtk2_adv-2.8 -lwx_gtk2_core-2.8 -lwx_base_xml-2.8 -lwx_base_net-2.8 -lwx_base-2.8 -lpthread -ldl -pthread
/home/gregor/.setups/codeblocks/src/sdk/.libs/libcodeblocks.so: undefined reference to `wxArrayString::Remove(wchar_t const*)'
/home/gregor/.setups/codeblocks/src/sdk/.libs/libcodeblocks.so: undefined reference to `wxFile::Access(wchar_t const*, wxFile::OpenMode)'
/home/gregor/.setups/codeblocks/src/sdk/.libs/libcodeblocks.so: undefined reference to `wxStringBase::InitWith(wchar_t const*, unsigned long, unsigned long)'
/home/gregor/.setups/codeblocks/src/sdk/.libs/libcodeblocks.so: undefined reference to `wxStringHash::wxCharStringHash(wchar_t const*)'
/home/gregor/.setups/codeblocks/src/sdk/.libs/libcodeblocks.so: undefined reference to `wxArrayString::Index(wchar_t const*, bool, bool) const'
/home/gregor/.setups/codeblocks/src/sdk/.libs/libcodeblocks.so: undefined reference to `wxStringBase::ConcatSelf(unsigned long, wchar_t const*, unsigned long)'
/home/gregor/.setups/codeblocks/src/sdk/.libs/libcodeblocks.so: undefined reference to `wxStringBase::wxStringBase(unsigned long, wchar_t)'
/home/gregor/.setups/codeblocks/src/sdk/.libs/libcodeblocks.so: undefined reference to `wxFile::wxFile(wchar_t const*, wxFile::OpenMode)'
/home/gregor/.setups/codeblocks/src/sdk/.libs/libcodeblocks.so: undefined reference to `operator+(wxString const&, wchar_t const*)'


I checked libwx_base-2.8.so with the nm-command and yes, it does contain at least the missing wxArrayString and wxFile symbols...

I am using openSuSE 11.1 64bit and compile with gcc (SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291].

Do you have an idea what I am doing wrong?

Regards,
 Gregor

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7092
    • My Best Post
Re: Linker Errors when linking libcodeblocks.so on Linux
« Reply #1 on: August 16, 2010, 10:40:32 pm »
Assuming you used ANSI the first time, Try compiling wxWidgets as an Unicode build.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org