# Clang 3.7 and Clang 4.0

**URL:** <https://forums.unrealengine.com/t/clang-3-7-and-clang-4-0/401101>\
**Category:** Platform & Builds\
**Tags:** clang, ubuntu, Linux, unreal-engine, UE4, question\
**Created:** [August 3, 2017, 4:22pm UTC](https://forums.unrealengine.com/t/clang-3-7-and-clang-4-0/401101 "2017-08-03T16:22:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![therealcain](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@therealcain](https://forums.unrealengine.com/u/therealcain)\
**Post date:** [August 3, 2017, 4:22pm UTC](https://forums.unrealengine.com/t/clang-3-7-and-clang-4-0/401101/1 "2017-08-03T16:22:29Z")

</div>

Hello,  
i have UE4.11 and every time i opening it its asking for:

UnrealBuildTool Exception: ERROR: This version of the Unreal Engine can only be compiled with clang 3.7, 3.6 and 3.5. clang 4.0.0 may not build it - please use a different version.

i know how to fix it but i’ll need to remove clang 4.0 and it’ll work but i have other applications that working on clang 4.0 .  
now my question is can i do that unreal engine by default will run on clang 3.7 and other programs will run on clang 4.0 ?

---

<div class="post-metadata">

**Author:** ![RCL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RCL](https://forums.unrealengine.com/u/RCL)\
**Post date:** [August 3, 2017, 4:38pm UTC](https://forums.unrealengine.com/t/clang-3-7-and-clang-4-0/401101/2 "2017-08-03T16:38:11Z")

</div>

These days multiple clang versions can be installed side by side. If you install clang-3.7 on the machine, UBT will be able to pick it up, while you can still be able to use other versions.

---

<div class="post-metadata">

**Author:** ![therealcain](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@therealcain](https://forums.unrealengine.com/u/therealcain)\
**Post date:** [August 3, 2017, 4:53pm UTC](https://forums.unrealengine.com/t/clang-3-7-and-clang-4-0/401101/3 "2017-08-03T16:53:45Z")

</div>

then why ue4 keeping give this error:

 ![203618-projectcreation.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/9/1/5915dedf583f2feef4cbd001dc5fd2a243f8926a.png)

how can i fix that ? because UBT not able to pick it up.

---

<div class="post-metadata">

**Author:** ![RCL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RCL](https://forums.unrealengine.com/u/RCL)\
**Post date:** [August 3, 2017, 4:58pm UTC](https://forums.unrealengine.com/t/clang-3-7-and-clang-4-0/401101/4 "2017-08-03T16:58:25Z")

</div>

UBT tries to use clang++ first, and only then clang+±3.7 if the former is not available. Either update alternatives to have clang++ point to 3.7, or remove clang++ altogether (leaving clang+±3.7 and clang+±4.0 intact) or update UBT code to change the order of compilers tried here: [https://github.com/EpicGames/UnrealEngine/blob/4.11/Engine/Source/Programs/UnrealBuildTool/Linux/LinuxToolChain.cs#L23](https://github.com/EpicGames/UnrealEngine/blob/4.11/Engine/Source/Programs/UnrealBuildTool/Linux/LinuxToolChain.cs#L23)

---

<div class="post-metadata">

**Author:** ![therealcain](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@therealcain](https://forums.unrealengine.com/u/therealcain)\
**Post date:** [August 3, 2017, 5:49pm UTC](https://forums.unrealengine.com/t/clang-3-7-and-clang-4-0/401101/5 "2017-08-03T17:49:04Z")

</div>

thank you! i’ve managed to fix it by these commands (For Those who have the same issue):

```
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.7 100
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.7 100
```
