LInking problems after switch to gcc-6.4.0

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

LInking problems after switch to gcc-6.4.0

jody.xha
Hi
I have application using gtkmm.2.4 which used to compile and link without problems.
After a recent update and switch tto gcc 6.4.0 i get linking errors:
-----
 xbv.o: In function `xbv::setImage(char const*)':
 /home/jody/progs/QHG3/trunk/visual/xbv.cpp:1641: undefined reference to `Gtk::Image::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
 /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../lib64/libgtkmm-2.4.so: undefined reference to `Glib::ustring::ustring(std::string const&)'
 collect2: error: ld returned 1 exit status
-----
I use `pkg-config gtkmm-2.4 --cflags` to compile those files actually using gtkmm, and `pkg-config gtkmm-2.4 --libs` to link the application.
The gtkmm version i have installed seems to be 2.24.4-r2; my OS is gentoo (linux-3.16.5-gentoo).

Any ideas how i can link my application again?
Thanks
  Jody

_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
Reply | Threaded
Open this post in threaded view
|

Re: LInking problems after switch to gcc-6.4.0

Daniel Boles

_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
Reply | Threaded
Open this post in threaded view
|

Re: LInking problems after switch to gcc-6.4.0

Jonathan Wakely
On 8 January 2018 at 10:19, Daniel Boles wrote:
> I guess it's probably this:
> https://stackoverflow.com/a/33395489/2757035

Yup, GCC 5+ has two versions of std::string, to link functions using
std::string both the caller and callee need to agree on which version
of std::string is used. Everything needs to be compiled consistently,
to use the same version of std::string.
_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list