Im getting this error message every time i try to start a c++ project

The project could not be compiled. Would you like to open it in Visual Studio?

Running C:/Program Files/Epic Games/UE_4.19/Engine/Binaries/DotNET/UnrealBuildTool.exe MyProject3 Development Win64 -project="C:/Users/Sturla Páll Gunnarss/Documents/Unreal Projects/MyProject3/MyProject3.uproject" -editorrecompile -progress -NoHotReloadFromIDE
Performing full C++ include scan (building a new target)
Creating makefile for MyProject3 (no existing makefile)
@progress push 5%
Parsing headers for MyProject3Editor
  Running UnrealHeaderTool "C:\Users\Sturla P?ll Gunnarss\Documents\Unreal Projects\MyProject3\MyProject3.uproject" "C:\Users\Sturla P?ll Gunnarss\Documents\Unreal Projects\MyProject3\Intermediate\Build\Win64\MyProject3Editor\Development\MyProject3Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
Reflection code generated for MyProject3Editor in 9.902669 seconds
@progress pop
Performing 13 actions (4 in parallel)
[2/13] Resource ModuleVersionResource.rc.inl
[3/13] Resource PCLaunch.rc
SharedPCH.Engine.cpp
MyProject3PlayerController.cpp
MyProject3Character.cpp
c1xx: fatal error C1083: Cannot open source file: 'C:\Users\\Documents\Unreal Projects\MyProject3\Source\MyProject3\MyProject3PlayerController.cpp': No such file or directory
c1xx: fatal error C1083: Cannot open source file: 'C:\Users\\Documents\Unreal Projects\MyProject3\Source\MyProject3\MyProject3Character.cpp': No such file or directory
MyProject3GameMode.cpp
c1xx: fatal error C1083: Cannot open source file: 'C:\Users\\Documents\Unreal Projects\MyProject3\Source\MyProject3\MyProject3GameMode.cpp': No such file or directory
MyProject3.cpp
MyProject3Character.gen.cpp
c1xx: fatal error C1083: Cannot open source file: 'C:\Users\\Documents\Unreal Projects\MyProject3\Source\MyProject3\MyProject3.cpp': No such file or directory
c1xx: fatal error C1083: Cannot open source file: 'C:\Users\\Documents\Unreal Projects\MyProject3\Intermediate\Build\Win64\UE4Editor\Inc\MyProject3\MyProject3Character.gen.cpp': No such file or directory
MyProject3GameMode.gen.cpp
MyProject3.init.gen.cpp
c1xx: fatal error C1083: Cannot open source file: 'C:\Users\\Documents\Unreal Projects\MyProject3\Intermediate\Build\Win64\UE4Editor\Inc\MyProject3\MyProject3.init.gen.cpp': No such file or directoryc1xx: fatal error C1083: Cannot open source file: 'C:\Users\\Documents\Unreal Projects\MyProject3\Intermediate\Build\Win64\UE4Editor\Inc\MyProject3\MyProject3GameMode.gen.cpp': No such file or directory

MyProject3PlayerController.gen.cpp
c1xx: fatal error C1083: Cannot open source file: 'C:\Users\\Documents\Unreal Projects\MyProject3\Intermediate\Build\Win64\UE4Editor\Inc\MyProject3\MyProject3PlayerController.gen.cpp': No such file or directory
ERROR: UBT ERROR: Failed to produce item: C:\Users\Sturla P?ll Gunnarss\Documents\Unreal Projects\MyProject3\Binaries\Win64\UE4Editor-MyProject3.dll
Total build time: 45.39 seconds (Local executor: 0.00 seconds)

Path encoding is a issue, you username “” have symbol that does not work the same on all encodings and some software might have problem to find the files trying to use improper encoding. Either change your system user name or make project outside Users directory

so i changed the name and it no longer has the symbol but i still get exactly the same error code wiith p?ll in my username

Hmm did directory name in Users didn’t change? If yes then only solution for this is moving project elsewhere then that directory.