Leadwerks and gcc 5.2.1 (regarding c++ abi)
I just updated my laptop to ubuntu 15.10 (from 15.04).
And got into some intereasting issues.
I rebuild my game with the new compiler, and it doesnt link anymore.
I got a bunch of undefined references like below:
undefined reference to `Leadwerks::Window::Create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, int, int, int)'
This didnt make any sense, the program was linking just fine with the previous version of gcc (4.9.2).
After some digging i found the explanation:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
It seems in gcc 5.1 a new abi was introduced, and the Leadwerks static lib was built with some previous version causing the above problems.
The solution i used was to add this macro at the begining of every cpp file in the project (in case of linux)
#define _GLIBCXX_USE_CXX11_ABI 0
Ths forces the use of the old abi and the game links just fine.
I suppose this wont be really a problem for Leadwerks, but was annoying to me.
Regards
- 4
0 Comments
Recommended Comments
There are no comments to display.