Hello!
I just bought a brand new PC and am installing Mint. So far, very happy.
I want to install a proper C & C++ development environment, but while I have messed with *nixen in days past, I am a little over my head here. I can usually find a succinct list of things to do to install the latest <package> using the Google, but my google-fu is off and I am uncertain how to proceed to get the latest/correct GCC and Clang environments.
Linux Mint 21.3 Cinnamon
Cinnamon 6.0.4
Kernel 6.5.0-17-generic
12th Gen Intel Core i7-12700K x 12
NVIDIA 2882
IIRC I must first install GCC, then Clang, then make sure the symlinks in `/usr/bin` are correct. Any caveats I should be aware of?
Clang 15
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Topics in this forum are automatically closed 6 months after creation.
Re: Clang 15
Linux Mint 21.3 has clang 14 for easy installation through Synaptic Package Manager or with
Linux Mint 22 due mid this year will have clang 17. Is having clang 15 now really important?
apt install clang
. It will install required dependencies automatically. You probably will want to install build-essential apt install build-essential
as well, which is a set of common packages for compiling.Linux Mint 22 due mid this year will have clang 17. Is having clang 15 now really important?
-
- Level 1
- Posts: 4
- Joined: Tue Feb 13, 2024 10:52 pm
Re: Clang 15
OK, thank you!
I can live with Clang 14 -- it has support for C++17 (and a lot of C++20), which will do.
Left me with the ability to compile using g++ but not clang++. After further googling it appears that Clang 14 requires:
(This was my simple test program:)
Now things work!
I can live with Clang 14 -- it has support for C++17 (and a lot of C++20), which will do.
sudo apt install build-essential clang
Left me with the ability to compile using g++ but not clang++. After further googling it appears that Clang 14 requires:
sudo apt install libstdc++-12-dev
(This was my simple test program:)
Code: Select all
#include <iostream>
#include <string>
int main( int argc, char ** argv )
{
std::string name = argc > 1 ? argv[1] : "world";
std::cout << "Hello " << name << "!\n";
}
Code: Select all
% clang++ -Wall -Wextra -pedantic-errors -O3 -std=c++17 hello.cpp -o hello
% ./hello everyone
Hello everyone!