Ups my bad, the steps I provided are not applicable for Unreal 5.1 as the build settings have been changed.
-
Open your Unreal project in the Unreal Editor.
-
In the main menu, click on “File” → “New C++ Class”. This will open the “Add New C++ Class” dialog.
-
Choose the class type you want to create, set the class name, and click “Create Class”. This will create a new C++ class and add it to your project.
-
In the Solution Explorer, right-click on the project name and select “Properties”.
-
In the “Configuration Properties” section, click on “VC++ Directories”.
-
In the “Include Directories” section, click on the down arrow and select “Edit…”. This will open the “Include Directories” dialog.
-
Click on the “New Line” button and add the path to your external include directory (e.g. “D:\Boost\Boost_1_81_0”).
This might do the thing