BOSSoNe0013 / track-o-bot

The friendly Hearthstone Tracker (Linux port)
https://trackobot.com
GNU Lesser General Public License v2.1
39 stars 6 forks source link

Make error #83

Closed whiteocean016 closed 7 years ago

whiteocean016 commented 7 years ago

Hello! I'm not sure if this is the right place for this question, but when I try to compile track-o-bot with make I get an error. I first did qmake track-o-bot.pro. The error:

tmp/Autostart.o: In function Autostart::SetActive(bool)': /home/quantech/libs/track-o-bot-master/src/Autostart.cpp:122: undefined reference tostd::cxx11::basic_string<char, std::char_traits, std::allocator >::c_str() const' /home/quantech/libs/track-o-bot-master/src/Autostart.cpp:122: undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()' /home/quantech/libs/track-o-bot-master/src/Autostart.cpp:123: undefined reference tostd::cxx11::basic_string<char, std::char_traits, std::allocator >::c_str() const' /home/quantech/libs/track-o-bot-master/src/Autostart.cpp:123: undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()' /home/quantech/libs/track-o-bot-master/src/Autostart.cpp:122: undefined reference tostd::cxx11::basic_string<char, std::char_traits, std::allocator >::~basic_string()' /home/quantech/libs/track-o-bot-master/src/Autostart.cpp:123: undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()' tmp/Autostart.o: In functionQByteArray::toStdString[abi:cxx11]() const': /home/quantech/libs/track-o-bot-master/../../anaconda2/include/qt/QtCore/qbytearray.h:662: undefined reference to `std::cxx11::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, unsigned long, std::allocator const&)' tmp/LinuxWindowCapture.o: In function LinuxWindowCapture::FindWindow(QString const&, QString const&)': /home/quantech/libs/track-o-bot-master/src/LinuxWindowCapture.cpp:107: undefined reference tostd::cxx11::basic_string<char, std::char_traits, std::allocator >::c_str() const' /home/quantech/libs/track-o-bot-master/src/LinuxWindowCapture.cpp:108: undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::c_str() const' /home/quantech/libs/track-o-bot-master/src/LinuxWindowCapture.cpp:108: undefined reference tostd::cxx11::basic_string<char, std::char_traits, std::allocator >::~basic_string()' /home/quantech/libs/track-o-bot-master/src/LinuxWindowCapture.cpp:107: undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()' /home/quantech/libs/track-o-bot-master/src/LinuxWindowCapture.cpp:108: undefined reference tostd::__cxx11::basic_string<char, std::char_traits, std::allocator >::~basic_string()' /home/quantech/libs/track-o-bot-master/src/LinuxWindowCapture.cpp:107: undefined reference to `std::__cxx11::basic_string<char, std::char_traits, std::allocator >::~basic_string()' collect2: error: ld returned 1 exit status Makefile.Debug:295: recipe for target 'build/Track-o-Bot' failed make[1]: [build/Track-o-Bot] Error 1 make[1]: Leaving directory '/home/quantech/libs/track-o-bot-master' Makefile:38: recipe for target 'debug' failed make: [debug] Error 2

I am using Ubuntu 16.04 LTS. I found something about using this flag -D_GLIBCXX_USE_CXX11_ABI=1 with compiling, but I don't know where or how to use it. I hope someone can help me or point me in the right direction for the answer.

angrylinuxuser commented 7 years ago

Could You try editing track-o-bot.pro so line 123 to look like this: DEFINES += PLATFORM=\\"linux\\" _GLIBCXX_USE_CXX11_ABI=1 and rerun qmake track-o-bot.pro and make?

whiteocean016 commented 7 years ago

Thank you for a fast response. I tried editing track-o-bot.pro and now i get a different error:

src/WebProfile.cpp: In member function ‘QNetworkRequest WebProfile::CreateWebProfileRequest(const QString&)’:

:0:10: error: expected ‘)’ before numeric constant src/WebProfile.cpp:112:62: note: in expansion of macro ‘PLATFORM’ request.setRawHeader( "User-Agent", "Track-o-Bot/" VERSION PLATFORM ); ^ Makefile.Debug:3809: recipe for target 'tmp/WebProfile.o' failed make[1]: *** [tmp/WebProfile.o] Error 1 make[1]: Leaving directory '/home/quantech/libs/track-o-bot-master' Makefile:38: recipe for target 'debug' failed make: *** [debug] Error 2 I had to do make clean first, otherwise I got the same error as before.
angrylinuxuser commented 7 years ago

I've made a typo. Could you try again? DEFINES += PLATFORM=\\"linux\\" _GLIBCXX_USE_CXX11_ABI=1 Edit: did you replaced the line with what i posted or added the _GLIBCXX_USE_CXX11_ABI=1 string? Cuz github is butchering what im trying to type. There should be three \ before "linux and there \ after.

whiteocean016 commented 7 years ago

Ah I see! There should be triple \ in the line right? Github has some formating rules it seems (need to write \ 6 times to get it to display it 3 times). I managed to make it work by using this in track-o-bot.pro DEFINES += PLATFORM=\\\"linux\\\" _GLIBCXX_USE_CXX11_ABI=0

It worked with ABI=0 and didn't work with ABI=1. Thank you for the help!