jichu4n / basic_wm

An example basic X11 window manager.
495 stars 72 forks source link

I am dumb, error with Glog. #2

Closed Syberyn closed 3 months ago

Syberyn commented 5 years ago
/usr/bin/ld: /tmp/ccaISolJ.o: in function `main':
main.cpp:(.text+0x2a): undefined reference to `google::InitGoogleLogging(char const*)'
/usr/bin/ld: main.cpp:(.text+0x66): undefined reference to `google::LogMessage::LogMessage(char const*, int, int)'
/usr/bin/ld: main.cpp:(.text+0x72): undefined reference to `google::LogMessage::stream()'
/usr/bin/ld: main.cpp:(.text+0x8d): undefined reference to `google::LogMessage::~LogMessage()'
/usr/bin/ld: main.cpp:(.text+0xdb): undefined reference to `google::LogMessage::~LogMessage()'
/usr/bin/ld: /tmp/ccRXsZzt.o: in function `WindowManager::Create()':
window_manager.cpp:(.text+0x22): undefined reference to `XOpenDisplay'
/usr/bin/ld: window_manager.cpp:(.text+0x4a): undefined reference to `google::LogMessage::LogMessage(char const*, int, int)'
/usr/bin/ld: window_manager.cpp:(.text+0x56): undefined reference to `google::LogMessage::stream()'
/usr/bin/ld: window_manager.cpp:(.text+0x72): undefined reference to `XDisplayName'
/usr/bin/ld: window_manager.cpp:(.text+0x89): undefined reference to `google::LogMessage::~LogMessage()'
/usr/bin/ld: window_manager.cpp:(.text+0xda): undefined reference to `google::LogMessage::~LogMessage()'
/usr/bin/ld: /tmp/ccRXsZzt.o: in function `WindowManager::~WindowManager()':
window_manager.cpp:(.text+0x1a7): undefined reference to `XCloseDisplay'
/usr/bin/ld: /tmp/ccRXsZzt.o: in function `_XDisplay*& google::CheckNotNull<_XDisplay*&>(char const*, int, char const*, _XDisplay*&)':
window_manager.cpp:(.text._ZN6google12CheckNotNullIRP9_XDisplayEET_PKciS6_OS4_[_ZN6google12CheckNotNullIRP9_XDisplayEET_PKciS6_OS4_]+0x86): undefined reference to `google::LogMessageFatal::LogMessageFatal(char const*, int, google::CheckOpString const&)'
/usr/bin/ld: window_manager.cpp:(.text._ZN6google12CheckNotNullIRP9_XDisplayEET_PKciS6_OS4_[_ZN6google12CheckNotNullIRP9_XDisplayEET_PKciS6_OS4_]+0x92): undefined reference to `google::LogMessageFatal::~LogMessageFatal()'
collect2: error: ld returned 1 exit status

help

necromancerthedark commented 3 years ago

Have you installed Glog? I assume you have to install the library via package manager.

RdXDavidaz commented 2 years ago

I have the same problem, and libgoogle-glog-dev is installed. I'm on debian 11. The basic_wm file must be in a specific location maybe ?

webslimeceo commented 3 months ago

I have this error too. I think it is because the glog library now uses cmake instead of make. https://google.github.io/glog/0.7.1/

jichu4n commented 3 months ago

I think the most likely reason is that the pkg-config tool is not installed (so sudo apt-get install pkg-config). I've added this to the README in #8.

I've also added automated builds for the latest versions of Debian, Ubuntu, Fedora and Arch as of now (06/2024). So closing this for now, but please reopen if still running into issues.