Project could not be compiled try rebuilding from source manually

Hello
I have spend quite a while trying to rebuild again and this is where i ended, i cant solve the log now
I Have tried deleting .vs, saved, Intermidate etc and the .sln file multiple times and rebuilding. The log says that declaration hides class member, so i have tried changing class to public but didnt solve it. How would i fix it and also how would i figure out if its a module that i needed to include?

This is the log from saved folder:
Using Visual Studio 2019 14.29.30037 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037) and Windows 10.0.19041.0 SDK (C:\Program Files (x86)\Windows Kits\10).
Building 6 actions with 24 processes…
@progress ‘Compiling C++ source code…’ 0%
@progress ‘Compiling C++ source code…’ 17%
[1/6] Project_XWeapon.cpp
@progress ‘Compiling C++ source code…’ 33%
[2/6] MenuWidget.cpp
E:\Unreal Projects\Project_X_Repo\Source\Project_X\MenuSystem\MenuWidget.cpp(40): error C4458: declaration of ‘MenuInterface’ hides class member
E:\Unreal Projects\Project_X_Repo\Source\Project_X\MenuSystem\MenuWidget.h(25): note: see declaration of ‘UMenuWidget::MenuInterface’
@progress ‘Compiling C++ source code…’ 50%
[3/6] Project_XGameInstance.cpp
E:\Unreal Projects\Project_X_Repo\Source\Project_X\Project_XGameInstance.cpp(67): error C4458: declaration of ‘Menu’ hides class member
E:\Unreal Projects\Project_X_Repo\Source\Project_X\Project_XGameInstance.h(48): note: see declaration of ‘UProject_XGameInstance::Menu’
LogInit: Warning: Still incompatible or missing module: Project_X
LogCore: Engine exit requested (reason: EngineExit() was called)
LogExit: Preparing to exit.

MenuWidget.cpp


MenuWidget.h
Skærmbillede 2021-06-08 084236
Project_XGameInstance.cpp
Skærmbillede 2021-06-08 084311
Project_XGameInstance.h
Skærmbillede 2021-06-08 084337

The parameter in SetMenuInterface has the same name as a member variable which shadows it. From 4.24 onwards this warning is now treated as an error.

Simply rename the parameter.

1 Like

Thank you Dan, you are a god :smiley:

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

Privacy & Terms