You are not logged in.

#1 2013-12-30 12:12:13

SuperV1234
Member
From: Italy
Registered: 2013-07-02
Posts: 14
Website

Correctly setting up a C++ development environment with clang++

I'm going to reinstall Arch x64 soon, as the current installation was not done properly, and I have some doubts on how I should set up my development environment correctly.
My compiler of choice is clang++ 3.4 SVN and my IDE of choice is QTCreator git.

I currently get and install those manually, but I may use the AUR in my next Arch installation.

Anyway, the issue is that QTCreator and other applications use /usr/bin/c++ by default, which is g++.
To solve (horribly) the issue, I changed my /usr/bin/c++ to an executable bash script that fowards the arguments to clang++.

This lead to issues such as warnings and errors not being catched by the IDE.

My question is: what is the correct way to set up a clang++ development environment?
How can I set clang++ as the default compiler for everything except AUR packages?
If you use clang++ as your main compiler, how did you solve this issue?

Offline

#2 2013-12-30 19:27:49

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Correctly setting up a C++ development environment with clang++

The canonical method of setting your (C++) compiler is to set the CXX environment variable.

Searching Google for "qtcreator compiler" yields things like: https://qt-project.org/doc/qtcreator-2. … hains.html

Offline

Board footer

Powered by FluxBB