Windows users:
There's a problem using older versions of of Unreal (such as 5.4) with newer versions of C++ libraries. Info
and fix
are available here
- Updates
- Important info
- Info
- Requirements
- Recommended Extensions
- Quick Start Guide
- Documentation
- Upgrading Older Projects
- Mac Support
- Troubleshooting
- (Bug) Older Unreal versions with newer C++ libraries (Windows only)
- Create BuildConfiguration.xml
- Installing correct LLVM (clangd/clang) versions
- Installing correct library versions (Windows)
- All supported Unreal version requirement links
New info Mar 15, 2025
This page has been updated. New sections and updated info.
New info Feb 12, 2025
Windows: Should use LLVM (clang-cl/clangd) 18.1.3-18.1.8 for Unreal 5.5.# . Note
: Linux is still recommended for 18.1.0
Updated Quick Start Guide: Updated below to latest/correct info
New update Nov 30, 2024
Extension v2.6.1: For Unreal 5.2 and newer releases
- Changed Mac fix default setting
Also from older release:
- Has Unreal Source file support (
finally!
) see here - UE 5.5 support (
note:
now uses clang/clangd v18.1.0) - Potential Mac fix
- See Changelog for more info
-
This extension now uses UBT to
Refresh your project
to update Intellisense files(compile commands). So this runs when you run the'Update Compile Commands'
command. Since this refreshes your project, your project's *.code-workspace file will be refreshed removing your clangd settings and others! but... -
This extension will
automatically backup and restore
your clangd settings when you run theUpdate Compile Commands
command. -
Make sure not to use any other way to
Refresh
your project.
Note:
I've added a setting that allows you to add additional settings to be backed up.
See change log for more info: https://github.com/boocs/unreal-clangd/blob/v2/CHANGELOG.md#250-2024-05-05
This extension:
-
Provides fast Code Completion, Formatting, and other cool features!
-
Has a command to create a clangd project for you
-
Fixes some clangd/Unreal quirks
-
Has a uninstall command
Note:
Windows users can use clang/clangd for Intellisense and still build with Microsoft's compiler
- Unreal v5.2+
- LLVM (clang/clangd) Different Unreal versions requirement different LLVM versions (see below)
- Unreal project created for VSCode
- VSCode clangd extension (Do not let the VSCode
clangd
extension auto install LLVM) - Microsoft C++ extension for its
Building/Debugging
Capability
- Before explanation on getting requirements here are some useful links:
note
: The links below will tell you the requirements for Unreal 5.5.#
- If you need requirements for older Unreal versions see All supported Unreal version requirements links
-
Unreal 5.5 Release Notes (Platform SDK Upgrades)
- Note: The link above can take too long to load so might not take you to the right section (
Platform SDK Upgrades
) - Try loading link twice
Windows
: Best resource (has everything you need)- Shows different .NET versions needed
- Shows
LLVM
(clang/clangd) version needed - Shows Windows SDK version needed
- Shows The C++ library needed
- Note: I would recommend using the versions mentioned in the section
IDE Version the Build farm compiles against
- See: Installing correct library versions (Windows)
- Also shows useful
Linux/Mac
info
- Note: The link above can take too long to load so might not take you to the right section (
-
Unreal Docs: Hardware and Software Specifications
- Useful info for
Linux
andMac
(Not that useful for Windows) - Use
Operating System
dropdown to change to Linux/Mac - You can change
Unreal Engine version
on left hand side
- Useful info for
-
Unreal Docs: Linux Development Requirements
- Shows useful
Linux
info - You can change
Unreal Engine version
on left hand side
- Shows useful
-
Unreal Docs: MacOS Development Requirements
- Shows usefull
Mac
info - You can change
Unreal Engine version
on left hand side
- Shows usefull
-
Microsoft's C++
Needed for Building/Debugging
-
File Switcher
For Alt+O clangd keyboard shortcut (Head/Source switcher)
Using Clangd's Alt+O implementation is buggy, for Unreal Source files, so this extension is a good alternative -
C++ Create Definition (my extension)
Updated Sept 2023
-
[Unreal Reflection Function Parameters] (Deprecated) New project coming soonish
This is generally correct, when using non-full source, but your situation could be different.
- Read the Requirements section
- Different Unreal Engine versions require different LLVM versions(Unreal 5.5 requires LLVM 18.1.0(Linux) and LLVM 18.1.8(Windows))
-
Install the vsix file from this github
(The vsix file can be downloaded from the
Releases
section on the right side column of this page. You might have to scroll up to see it.)
- Click the extensions icon
- Click the ellipsis (3 dots)
- Choose Install from VSIX...
- Ignore any VSCode warning messages (should go away after creating a project)
Linux:
In the next step(project creation), File Dialogues will spawn behind VSCode(known bug)
Note:
Make sure to read requirements! Different Unreal version usually require different clang/clangd
and XCode
versions
Windows Users:
The requirements sections has easy
instructions on how to install different Build Tools 2022 versions. These are required because other versions may cause fake red error squiggles
.
This version had some changes!
This hasn't been proven to work yet(let me know!)
.
There a new setting to try if you haven't been successful in getting clangd to work.
unreal-clangd.creation.MacFileLanguage
You can change the clangd Mac file language to C++ or Objective C++ (thanks to user szabot0412)
- The Objective C++ setting,
-xobjective-c++
, is a misnomer. It just means it will treat Objective C++ files as Objective C++ and C++ files as C++ - This setting is set in your .clangd files during project creation (.clangd file in project directory and Unreal directory)
- in the Add: section, it's the line that shows
- -xc++
or- -xobjective-c++
so if you want to test quickly with reinstalling. I believe- -xobjective-c++
is the correct one to use but I could be wrong!
Adding code or a space, in a header file, anywhere above the GENERATED_BODY macro will cause red squiggles. This is because the GENERATED_BODY macro uses the __LINE__ preprocessor macro.
- You'll need to Build your project to get rid of the red squiggles.
- Now you'll need to get clangd to reevaluate the file. See the Refresh File's Instellisense section below
- You can type a space in the file, wait half a second, and delete the space (this makes clangd reevaluate the file)
- You can also run the command clangd:
Restart language server
(on restart clangd will reevaluate the file) - Or you can close and reopen the file
The extension pulls the Unreal Uri from your project's *.code-workspace file. If you don't create a Unreal (VSCode) project then this file isn't created. You also must double click this file to open your project as a 'Workspace'. You can force Unreal to always create a VSCode project with a BuildConfiguration.xml file.
-
*.code-workspace file
-
When you double click on the file you'll see 'Workspace' in the VSCode title area:
-
When you open VSCode without a project, you'll get this screen which also tells you if you're opening as a 'Workspace'
I've run into this bug. Pressing control+space (Windows) will manually activate Code Completion. Look up your keyboard shortcut for your system.
If you add a plugin to *.build.cs you'll need to run the extension command to Update Compile Commands.
See this section for more info
- Double click on the UE5.code-workspace file in your Unreal directory
- Build the Editor inside VSCode
- Since you want to Launch it after it's done you can just use Run And Debug instead of Run Build Task. Unless you're heavily debugging you'll want to use the Development config.
- Once you set the above you can run it by hitting the F5 key or ctrl+F5 to run it without debugging.
- After it builds the Editor should run and you can now create a Full Source project.
- This is what pops up after I'm done compiling and it runs: (This is full source 5.4.1)
Thanks to user nmdMnk for the report!
- Unreal 5.4 on Windows requires clang
16.0.6
- Unreal 5.4's defaults are MSVC 14.38.33130 and Windows 10 SDK 10.0.18362.0 (according to 5.4 release notes)
- Trouble is Unreal 5.4 can and will use newer versions of MSVC and Windows 10 SDKs
- Newer MSVC versions require clang
18+
- So now you get errors if you have the updated C++ libraries.
This fix might work better if you're using Visual Studio Build Tools 2022 instead of relying on Visual Studio 2022's libraries.
Note:
This 'simple' fix isn't for everyone. Uninstalling and preventing newer C++ library updates is easy but might cause problems elsewhere. Also you might forget that you did this and, in the future, wonder why newer versions of Unreal aren't working.
The 2nd fix
, below this fix, takes a little more work but works within clangd to fix it.
1st Fix:
-
Simple fix would be to uninstall the newer C++ libraries and Windows 10 SDKs
-
The Visual Studio Installer allows you to do this
-
Check out the 2nd fix below for pictures of modifying the Visual Studio Installer
-
You will want to uninstall any MSVC versions above 14.38
-
Make sure to also remove the checkmark to always install the latest MSVC version
-
Also make sure to uninstall any Windows 10 SDKs above 10.0.18362.0
If you don't want to do the first fix this fix works within clangd to fix the problem. You won't have to worry about uninstalling anything.
-
Add this to both .clangd files (your project and Unreal directory) Add it to the 'Add' section.
Add: - /X - -fms-compatibility-version=19.38.33144 - /imsvcC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include - /imsvcC:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt - /imsvcC:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared - /imsvcC:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um - /imsvcC:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\winrt - /imsvcC:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\cppwinrt
-
All/some paths might be different so you'll have to adjust them (note the single backslash)
- Your path also might be different because you're using Visual Studio 2022 and not Visual Studio Build Tools like I am
- Visual Studio 2022 follows the same pattern as Visual Studio Build Tools 2022
- Here is a users example of the path he used for Visual Studio 2022
- /imsvcC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include
-
All version numbers are correct and you should probably use them
-
When you check the 5.4 release notes it says for Windows that MSVC 14.38.33130 and Windows 10 SDK 10.0.18362.0 are the default
-
You can download different MSVC versions from the Visual Studio Installer
-
You can download different Windows 10 SDKs from the Visual Studio Installer
-
/X was the key. It prevents clangd from pulling the version from a environmental variable
-
You can make sure -fms-compatibility-version=19.38.33144 is correct by doing
.\cl
in powershell. Here's what it looks like: -
Note:
5.5.# currently doesn't have this problem. If it does in the future, it actually has another include to use.- /imsvcC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\atlmfc\include\
So in the future this fix might need to adjust to the newer includes of future Unreal Engine releases.
To make Unreal Build Tool create a VSCode project by default you can use a BuildConfiguration.xml file. Here is the info about which directories you can create it in and what options are available.
https://dev.epicgames.com/documentation/en-us/unreal-engine/build-configuration-for-unreal-engine
Note:
On Windows I created the directory structure and xml file in my Documents folder (ME is my user name so it will be different for you):
E:\Users\ME\Documents\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml
Here's a basic BuildConfiguration.xml (It's easy to create all this using VSCode)
<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<ProjectFileGenerator>
<Format>VisualStudioCode</Format>
</ProjectFileGenerator>
</Configuration>
note
: These examples are for Unreal 5.5.#
. Make sure you get the correct library and compiler versions for your specific
Unreal version
- Get the correct LLVM (clangd/clang) version from the Release Notes of your Unreal version.
- See: All supported Unreal version requirements links for
Release Note
links
- See: All supported Unreal version requirements links for
- If you check out the Release Notes link for 5.5.# you see that
Windows uses LLVM 18.1.8
- You can download it here: https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.8
- The file you want is:
LLVM-18.1.8-win64.exe
- Any of the links in All supported Unreal version requirements links will tell you which version of
LLVM
(clangd/clang) to install - It's hard on Linux to install specific versions unless you want to compile it yourself
- You can try the latest of the version it recommends but might run into issues
- If you do run into issues try compiling/using the correct version
- Here's how I've had success installing version 18 for Unreal 5.5.#
Note
: This installs 18.1.8 but 18.1.0 is the recommendation for Linux and Unreal 5.5.#
wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh sudo ./llvm.sh 18
- dotnet-runtime-6.0 and dotnet-sdk-6.0 might also be required but doesn't say in any of the requirement links.
- This was true in Unreal ~5.2.
- Maybe not required or newer versions required now.
- Unreal docs doesn't give specifics about clang/clangd like it does Windows/Linux
- It gives
Xcode
versions, which you should install for its libraries.- I recommend the
Xcode
version listed in the Unreal Release Notes for your Unreal version - Section:Platform SDK Upgrades
Subsection:IDE version the Build farm compiles against
- See All supported Unreal version requirements links for link to Release Notes
- I recommend the
- For what
LLVM
(clang/clangd) version to install I would try following the Linux instructions- If that doesn't work go to your project's .vscode folder
- Open up one of the compile commands JSON files that are in there.
- Check which compiler it's using.
- Open the compiler's parent folder in your terminal and poll it for version info
- Install the LLVM version which matches the compiler you just polled
Note
: In the 3.0.0 extension release, you can choose the C++ library and Windows SDK the project uses. This can minimize problems.
-
Run the
Visual Studio Installer
to install other versions of:- C++ Libraries
- Windows SDK
- .NET libraries
-
I use the stand-alone
Visual Studio Build Tools 2022
but this also should work if you have theVisual Studio 2022
IDE installed. -
This example is for Unreal 5.5.# but it can apply to older Unreal versions. Older versions will probably require different clangd/library versions so make sure to see here for older version requirement links: Older Version Requirement Links
-
From the
Visual Studio installer
click onModify
next to Build Tools 2022 or VS 2022 IDE -
Switch the tab to
Individual components
(To make it easier use Search Components box) -
Windows users will most likely find all requirements in the Unreal Release Notes (
Platform SDK Upgrades section
): Unreal 5.5 Release NotesNote:
The 'release notes' link is slow to load so wont take you to the correct 'Platform SDK Upgrades' section unless you load twice.- Use C++/Windows SDK versions found in the subsection
IDE Versions the Build farm compiles against
. Found under the Platform SDK Upgrades section.
Below are the versions found in the Unreal 5.5 Release Notes and what they look like in the Visual Studio Installer (Individual components)
.
-
Here's the
Platform SDK Upgrades
section in the Unreal 5.5 Release Notes- For older Unreal version Release Notes see here
-
Visual Studio 2022 17.8 14.38.33130
(In subsection: 'IDE Version the Build farm compiles against' in 5.5 release notes)- Some other entries look similiar.
- Note the
x64/x86 build tools
-
Windows 10 SDK (10.0.22621.0)
(In subsection: 'IDE Version the Build farm compiles against' in 5.5 release notes)- Windows 11: Use same version number unless specified
-
.NET 8.0
(Found in Unreal Release Notes. Platform SDK Upgrades section): -
.NET 4.6.2 Targeting Pack
(Found in Unreal Release Notes. Platform SDK Upgrades section): -
Make sure to click the Visual Studio Installer's
Modify
button to install your new libraries.
-
Release Notes link is slow to load
- Load site twice to go directly to section:
Platform SDK Upgrades
- Load site twice to go directly to section:
-
Release Notes are best for
Windows
but has useful Linux/Mac info- Info in Platform SDK Upgrades section
- For Windows:
- Use C++/Windows SDK versions found in subsection 'IDE Version the Build farm compiles against'
-
Also see:
Release Notes: 5.5.# (Platform SDK Upgrades)
Unreal Docs Requirements: Requirements
Unreal Docs Linux Requirements Linux
Unreal Docs MacOS requirements MacOS
Release Note: 5.4.# (Platform SDK Upgrades)
Unreal Docs Requirements: Requirements
Unreal Docs Linux Requirements: Linux
Unreal Docs MacOS Requirements: MacOS
Release Note: 5.3.# (Platform SDK Upgrades)
Unreal Docs Requirements: Requirements
Unreal Docs Linux Requirements: Linux
Unreal Docs MacOS Requirements: MacOS
Release Note: 5.2.# (Platform SDK Upgrades)
Unreal Docs Requirements: Requirements
Unreal Docs Linux Requirements: Linux
Unreal Docs MacOS Requirements: MacOS