Juce 5.3 std=c++14 clang llvm or g++ best option? + Breaking devel packages?


Hello *

I managed to build the projucer with g++ std=c++11. But when I try to build the AudioPluginHost I get the g++: error: unrecognized command line option ‘-std=c++14’.

When I read the release notes for Juce 5.3 I saw that the standard for projects has been updated to c++14. Does that mean I have to rebuild the projucer, after updating g++? Or will it work? I am reluctant to update g++ since I am used to this version and afraid it might break other things I am working on and distro related things(devel libs etc.), can I just compile with std=c++1y or is it not safe? Will my installed centos devel packages still work with the new gcc or will I have to find them all somewhere random?

I also read about clang but it apparently is still highly experimental so I don’t know if I should use it at this stage. What are the benefits/downsides?

God damn what a mess…



First of all you can of course have installed multiple versions of GCC in parallel on your machine. It has been quite a long time ago since I used Centos, but I remember that the development tools shipped with this distro were quite old (should I say outdated), so I always needed to update the GCC manually in order to use the latest C++ features I wanted to use and that JUCE makes use of.

However, if there are multiple GCC versions only one of them will be linked to the gcc / g++ alias you call from the console, so you might need to call the explicit version you want to use if there are multiple versions installed.

Highly experimental? Not really, not at all. Where did you get that information from? Clang has been the standard compiler on Apple systems for decades, it is really powerful and works like a charm. I switched over to clang++ as my go-to compiler for Ubuntu builds, as build times are a lot faster with clang compared to gcc. So if you don’t want to use any non-standard gcc-exclusive options, I’d highly recommend trying out clang.

If you successfully built the Projucer and it runs fine, there is no need to rebuild it with a different compiler. The Projucer “just” generates the Makefile for you according to your project settings so there is no need to even have the compiler your project should use installed on the machine that executes the Projucer.



Thank you for the info.

I can’t find where I found that clang was experimental it was in a ‘c++ compiler for atom’ page. Maybe it was just for that project. Yeah I’ll check out clang and it’s benefits

I didn’t understand the scl command

I used :
yum install devtoolset-8
scl enable devtoolset-8 bash

This enables gcc 8 inside your current shell and you can make.

My apologies for the late reply I was going through some personal stuff