Linux: GenerateProjectFiles.sh ignores AdditionalCompilerArguments in Target.cs

Hey everyone,

my UE5.2 project builds just fine in CLI with
$UE5_PATH/Build/BatchFiles/Linux/Build.sh Development Linux -Project=“$PROJECT_PATH” -TargetType=Editor -Progress -NoHotReloadFromIDE -verbose

But I would like to use VSCode’s debugging tools.
Therefore I create the necessary project files with
$UE5_PATH/Build/BatchFiles/Linux/GenerateProjectFiles.sh -Project=“$PROJECT_PATH” -game -engine

When trying to build within VSCode afterward, clang complains about different errors that I set to ignore as AdditionalCompilerArguments in project.Target.cs, like -Wno-reorder-ctor.
My additional arguments are not set int c_cpp_properties.json either. Even adding them manually takes no effect.

Is there something I miss here?

I just found out that VSCode does not even execute the same build command:
…/Build.sh MYPROJECT Linux Debug …/MYPROJECT.uproject -waitmutex

But where is that build command specified?

The solution was that VSCode has two dropdown menus to select configurations. One is the “c/c++ configuration” in the lower right, and one is the “select and start debug configuration” in the lower left. And the latter was pointing to the wrong configuration. The problem is that the second dropdown menu only appears after I hit F5 once and therefore start building the wrong configuration. I don’t know why that menu is not visible from the get-go… but who knows… case solved

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.