yourWaifu / sleepy-discord

C++ library for the Discord chat client. Please use Rust for new bots
https://yourWaifu.github.io/sleepy-discord/
MIT License
705 stars 95 forks source link

Debian9 -lsleepy_discord linking issues #56

Open noglass opened 6 years ago

noglass commented 6 years ago

After installing all needed libraries and packages and successfully compiling sleepy_discord, when compiling the hello example, I get linking errors with libsleepy_discord:

nigel@dontdeleteme:~/Documents/SleepyDiscord/sleepy-discord/examples/hello$ g++ -std=c++11 -I ../../include -I ../../deps -I ../../deps/include -I ../../include/sleepy_discord/IncludeNonexistant -L../../buildtools -L/usr/lib -lsleepy_discord -lcurl -lssl -lcrypto example0.cpp -o example.out
/usr/bin/ld: /tmp/ccsWbvjx.o: undefined reference to symbol 'pthread_join@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
nigel@dontdeleteme:~/Documents/SleepyDiscord/sleepy-discord/examples/hello$ g++ -std=c++11 -I ../../include -I ../../deps -I ../../deps/include -I ../../include/sleepy_discord/IncludeNonexistant -L../../buildtools -L/usr/lib -pthread -lsleepy_discord -lcurl -lssl -lcrypto example0.cpp -o example.out
/tmp/ccYirsUv.o: In function `main':
example0.cpp:(.text+0x10ef): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::run()'
/tmp/ccYirsUv.o: In function `myClientClass::onMessage(SleepyDiscord::Message)':
example0.cpp:(.text._ZN13myClientClass9onMessageEN13SleepyDiscord7MessageE[_ZN13myClientClass9onMessageEN13SleepyDiscord7MessageE]+0x5b): undefined reference to `SleepyDiscord::Message::startsWith(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
example0.cpp:(.text._ZN13myClientClass9onMessageEN13SleepyDiscord7MessageE[_ZN13myClientClass9onMessageEN13SleepyDiscord7MessageE]+0xdf): undefined reference to `SleepyDiscord::BaseDiscordClient::sendMessage(SleepyDiscord::Snowflake<SleepyDiscord::Channel>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)'
/tmp/ccYirsUv.o: In function `myClientClass::myClientClass(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char)':
example0.cpp:(.text._ZN13myClientClassC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc[_ZN13myClientClassC5ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc]+0x41): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::WebsocketppDiscordClient(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char)'
/tmp/ccYirsUv.o: In function `myClientClass::~myClientClass()':
example0.cpp:(.text._ZN13myClientClassD2Ev[_ZN13myClientClassD5Ev]+0x22): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::~WebsocketppDiscordClient()'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x10): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::run()'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x18): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::schedule(std::function<void ()>, long)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x20): undefined reference to `SleepyDiscord::BaseDiscordClient::onReady(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x28): undefined reference to `SleepyDiscord::BaseDiscordClient::onResumed(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x30): undefined reference to `SleepyDiscord::BaseDiscordClient::onDeleteServer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x38): undefined reference to `SleepyDiscord::BaseDiscordClient::onEditServer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x40): undefined reference to `SleepyDiscord::BaseDiscordClient::onBan(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x48): undefined reference to `SleepyDiscord::BaseDiscordClient::onUnban(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x50): undefined reference to `SleepyDiscord::BaseDiscordClient::onMember(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x58): undefined reference to `SleepyDiscord::BaseDiscordClient::onRemoveMember(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x60): undefined reference to `SleepyDiscord::BaseDiscordClient::onDeleteMember(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x68): undefined reference to `SleepyDiscord::BaseDiscordClient::onEditMember(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x70): undefined reference to `SleepyDiscord::BaseDiscordClient::onRole(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x78): undefined reference to `SleepyDiscord::BaseDiscordClient::onDeleteRole(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x80): undefined reference to `SleepyDiscord::BaseDiscordClient::onEditRole(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x88): undefined reference to `SleepyDiscord::BaseDiscordClient::onEditEmojis(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x90): undefined reference to `SleepyDiscord::BaseDiscordClient::onMemberChunk(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x98): undefined reference to `SleepyDiscord::BaseDiscordClient::onDeleteChannel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0xa0): undefined reference to `SleepyDiscord::BaseDiscordClient::onEditChannel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0xa8): undefined reference to `SleepyDiscord::BaseDiscordClient::onPinMessages(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0xb0): undefined reference to `SleepyDiscord::BaseDiscordClient::onPresenceUpdate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0xb8): undefined reference to `SleepyDiscord::BaseDiscordClient::onEditUser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0xc0): undefined reference to `SleepyDiscord::BaseDiscordClient::onEditUserNote(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0xc8): undefined reference to `SleepyDiscord::BaseDiscordClient::onEditUserSettings(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0xd0): undefined reference to `SleepyDiscord::BaseDiscordClient::onEditVoiceState(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0xd8): undefined reference to `SleepyDiscord::BaseDiscordClient::onTyping(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0xe0): undefined reference to `SleepyDiscord::BaseDiscordClient::onDeleteMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0xe8): undefined reference to `SleepyDiscord::BaseDiscordClient::onEditMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0xf0): undefined reference to `SleepyDiscord::BaseDiscordClient::onBulkDelete(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0xf8): undefined reference to `SleepyDiscord::BaseDiscordClient::onEditVoiceServer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x100): undefined reference to `SleepyDiscord::BaseDiscordClient::onServerSync(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x108): undefined reference to `SleepyDiscord::BaseDiscordClient::onRelationship(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x110): undefined reference to `SleepyDiscord::BaseDiscordClient::onRemoveRelationship(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x118): undefined reference to `SleepyDiscord::BaseDiscordClient::onDeleteRelationship(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x120): undefined reference to `SleepyDiscord::BaseDiscordClient::onReaction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x128): undefined reference to `SleepyDiscord::BaseDiscordClient::onRemoveReaction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x130): undefined reference to `SleepyDiscord::BaseDiscordClient::onDeleteReaction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x138): undefined reference to `SleepyDiscord::BaseDiscordClient::onRemoveAllReaction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x140): undefined reference to `SleepyDiscord::BaseDiscordClient::onDeleteAllReaction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x150): undefined reference to `SleepyDiscord::BaseDiscordClient::onEditedMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x158): undefined reference to `SleepyDiscord::BaseDiscordClient::onServer(SleepyDiscord::Server)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x160): undefined reference to `SleepyDiscord::BaseDiscordClient::onChannel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x168): undefined reference to `SleepyDiscord::BaseDiscordClient::onEditedRole(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x170): undefined reference to `SleepyDiscord::BaseDiscordClient::onDispatch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x178): undefined reference to `SleepyDiscord::BaseDiscordClient::onHeartbeat()'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x180): undefined reference to `SleepyDiscord::BaseDiscordClient::onHeartbeatAck()'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x188): undefined reference to `SleepyDiscord::BaseDiscordClient::onInvaldSession()'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x190): undefined reference to `SleepyDiscord::BaseDiscordClient::onDisconnect()'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x198): undefined reference to `SleepyDiscord::BaseDiscordClient::onResume()'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1a0): undefined reference to `SleepyDiscord::BaseDiscordClient::onQuit()'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1a8): undefined reference to `SleepyDiscord::BaseDiscordClient::onResponse(SleepyDiscord::Response)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1b0): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::sleep(unsigned int)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1b8): undefined reference to `SleepyDiscord::BaseDiscordClient::fileRead(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1c0): undefined reference to `SleepyDiscord::BaseDiscordClient::tick(float)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1c8): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::onError(SleepyDiscord::ErrorCode, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1d0): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::connect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1d8): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::send(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1e0): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::disconnect(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1e8): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::runAsync()'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1f0): undefined reference to `SleepyDiscord::BaseDiscordClient::getEpochTimeMillisecond()'
/tmp/ccYirsUv.o:(.data.rel.ro._ZTI13myClientClass[_ZTI13myClientClass]+0x10): undefined reference to `typeinfo for SleepyDiscord::WebsocketppDiscordClient'
collect2: error: ld returned 1 exit status

I am on Debian 9.4.0 with g++ (Debian 6.3.0-18+deb9u1) 6.3.0 20170516

You may also want to add -pthread to the tutorial as it is needed on linux.

Further notes, just incase, I also tried to compile sleepy_discord with -pthread, but I don't believe it is necessary as it compiles either way. Same end result with and without it.

Also, I ran the setup.py with options 1 and 0 1, everything was successful.

Initially, when trying to compile, I ran into the issue with openssl where SSL_R_SHORT_READ is undefined, I fixed this by applying this patch: https://github.com/LocutusOfBorg/websocketpp/commit/1dd07113f2a7489444a8990a95be42e035f8e9df

After applying the patch and successfully making, the file ./buildtools/libsleepy_discord.a exists and is seemingly found by the linker.

Upon further investigation, I found this:

nigel@dontdeleteme:~/Documents/SleepyDiscord/sleepy-discord/examples/hello$ g++ -std=c++11 -I ../../include -I ../../include/sleepy_discord -I ../../deps -I ../../deps/include -I ../../include/sleepy_discord/IncludeNonexistant -L../../buildtools -L/usr/lib -pthread -lcurl -lssl -lcrypto example0.cpp ../../sleepy_discord/*.cpp ../../sleepy_discord/*.c -o example.out
../../sleepy_discord/websocketpp_websocket.cpp: In member function ‘virtual SleepyDiscord::Timer SleepyDiscord::WebsocketppDiscordClient::schedule(std::function<void()>, time_t)’:
../../sleepy_discord/websocketpp_websocket.cpp:59:39: error: could not convert ‘<lambda closure object>SleepyDiscord::WebsocketppDiscordClient::schedule(std::function<void()>, time_t)::<lambda()>{std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock> >(timer)}’ from ‘SleepyDiscord::WebsocketppDiscordClient::schedule(std::function<void()>, time_t)::<lambda()>’ to ‘SleepyDiscord::Timer’
   return [timer]() { timer->cancel(); };
                                       ^

Note: Because I did not install uwebsockets, I renamed ./sleepy_discord/uwebsockets_websocket.cpp so that g++ would not include it.

However, when running make -f Makefile.linux; ./buildtools/websocketpp_websocket.o is created..

yourWaifu commented 6 years ago

I'm not at home, where my computer is, so I can't confirm that this works but I think changing

return [timer]() { timer->cancel(); };

to

return Timer([timer]() { timer->cancel(); });

may fix the could not convert lambda. The others, I'll need wait til I'm at my computer to do some testing.

noglass commented 6 years ago

Thanks for the fast reply!

With that change, I was able to compile the example with the following command:

nigel@dontdeleteme:~/Documents/SleepyDiscord/sleepy-discord/examples/hello$ g++ -std=c++11 -I ../../include -I ../../include/sleepy_discord -I ../../deps -I ../../deps/include -I ../../include/sleepy_discord/IncludeNonexistant -L../../buildtools -L/usr/lib -pthread -lcurl -lssl -lcrypto ../../deps/cpr/cpr/*.cpp ../../sleepy_discord/*.cpp ../../sleepy_discord/*.c example0.cpp -o example.out
nigel@dontdeleteme:~/Documents/SleepyDiscord/sleepy-discord/examples/hello$ 

It also appears that CPR may not be properly installed in the setup.

Without manually compiling each file every time, I still get various linking errors. I even tried adding the compiled .o files instead of recompiling each one, but to no avail:

nigel@dontdeleteme:~/Documents/SleepyDiscord/sleepy-discord/examples/hello$ g++ -std=c++11 -I ../../include -I ../../include/sleepy_discord -I ../../deps -I ../../deps/include -I ../../include/sleepy_discord/IncludeNonexistant -L../../buildtools -L/usr/lib -pthread -lcurl -lssl -lcrypto ../../deps/cpr/cpr/*.cpp ../../buildtools/*.o example0.cpp -o example.out../../buildtools/client.o: In function `SleepyDiscord::CustomSession::CustomSession()':
client.cpp:(.text._ZN13SleepyDiscord13CustomSessionC2Ev[_ZN13SleepyDiscord13CustomSessionC5Ev]+0x29): undefined reference to `SleepyDiscord::CustomSession::init'
/tmp/ccgWSBgX.o: In function `main':
example0.cpp:(.text+0x10ef): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::run()'
/tmp/ccgWSBgX.o: In function `myClientClass::myClientClass(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char)':
example0.cpp:(.text._ZN13myClientClassC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc[_ZN13myClientClassC5ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc]+0x41): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::WebsocketppDiscordClient(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char)'
/tmp/ccgWSBgX.o: In function `myClientClass::~myClientClass()':
example0.cpp:(.text._ZN13myClientClassD2Ev[_ZN13myClientClassD5Ev]+0x22): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::~WebsocketppDiscordClient()'
/tmp/ccgWSBgX.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x10): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::run()'
/tmp/ccgWSBgX.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x18): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::schedule(std::function<void ()>, long)'
/tmp/ccgWSBgX.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1b0): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::sleep(unsigned int)'
/tmp/ccgWSBgX.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1c8): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::onError(SleepyDiscord::ErrorCode, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/ccgWSBgX.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1d0): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::connect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/tmp/ccgWSBgX.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1d8): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::send(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/ccgWSBgX.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1e0): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::disconnect(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/ccgWSBgX.o:(.data.rel.ro._ZTV13myClientClass[_ZTV13myClientClass]+0x1e8): undefined reference to `SleepyDiscord::WebsocketppDiscordClient::runAsync()'
/tmp/ccgWSBgX.o:(.data.rel.ro._ZTI13myClientClass[_ZTI13myClientClass]+0x10): undefined reference to `typeinfo for SleepyDiscord::WebsocketppDiscordClient'
collect2: error: ld returned 1 exit status

This is with a newly compiled setup after making the Timer change.