Closed MarshmelloSUCKS closed 5 years ago
@MarshmelloSUCKS So yeah, I've managed to reproduce the issue. The issue is with the g++
's packages it depends on version mismatch -- to build TermColor, you need the g++
(the C++ compiler) to support the features of C++17. Directly installing g++
on Ubuntu 19.04 installs a meta-package g++-8
, which is an older version, and you need g++-9
.
So here's a workaround. Assuming you followed the instructions step by step, you probably have installed the g++
package. Running apt list --installed | grep g++
would yield the following:
g++-8/disco,now 8.3.0-6ubuntu1 amd64 [installed,automatic]
g++/disco,now 4:8.3.0-1ubuntu3 amd64 [installed]
So, remove g++
and its meta-packages:
sudo apt remove g++ g++-8
sudo apt autoremove # (to remove `libstdc++-8-dev`)
Obtain g++-9, and gcc-9 (the C compiler). Then update the compiler linking:
sudo apt install g++-9 gcc-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 20 --slave /usr/bin/g++ g++ /usr/bin/g++-9
Now running g++ --version
or gcc --version
will tell you that both g++
and gcc
are version 9.1.0.
The project should build successfully now.
I should probably update the README with building instructions for different Linux distributions.
I tried dragging a 200kb JPG file into TermColor and it crashed. Here's what it says: