Tag Archives: unreal

[Solved] C++ Compile Error: prerequisites are different [How to Solve]

Scene

When adding new x.h/x.hpp/X.C/x.cpp files to the UE4 project, even if there are no other files to include these new files, the following errors may appear during compilation (both build and rebuild):
unrealbuildtool prerequisites are different
this error occurs when the x.obj file is compiled, but the link operation cannot be performed correctly

reason

As the name suggests, there is no problem with the code itself, but that the code block cannot be integrated into the existing project. UE4 has preprocessing on the path for the include file. If the path name of the file is duplicate, this problem will occur. For example:

1. Proto/error.pb.h already exists under module 

2. try to add Server/XXServer/proto/error.pb.h

According to the include rule of UE4, #include "proto/error.Pb.H" may point to two files at the same time (when the files in the server/xxserver directory are imported), so it cannot be judged accurately, and an error is reported during compilation.

Note: unrealbuildtool under Windows does not judge case, and the paths of proto/and proto/are the same

Solution:

    directory paths should not overlap. Try to avoid the path with the same name.
    1. There should be no files with the same name under the path

 

unreal——UnrealBuildTool : error : Unable to deleteXXXX

UnrealBuildTool: error: Unable to delete E:\\\\UnrealDemo\WinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWin5Editor-UnrealDemoDemoDemoDemoDemoDemoDemoDemoDemo.dll: WinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWin5555555555999161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161635775;- 38382;- 34987;- 25298;- 32477;


38381;- unreal;-28982;- 20877;- vs35793s;

Unreal4 C++ error guidelines

 

I believe that students are now starting to use C++ development method to complete some functions or try to understand the internal application process of UnrealEngine4, the process is naturally indispensable
Epic
Self packaged C++ dealing.

The
Of course, C++ with UnrealEngine4 must be complied with
UE4 engineering
Rules such as the entire project configuration are basically done using the [NMaker] configuration. You need to compile the [UnrealHeaderTool] tool before compiling the code
UnrealHeaderTool to compile our own projects. Of course, the entire build process was compiled as for UnrealEngine3 using the command line (to address both platform expansion and IDE decoupling). The various \UnrealEngine\Engine\Build\ files \ folders under the BatchFiles start calling each other during the entire compilation of Windows… (Well, usually we don’t care.)

since the UnrealEngine4 has its own rules, the more problems we run into in the process of updating the UnrealEngine4. The following is a collection of problems I encountered to share with you, I hope you can quickly solve the problem, less detours.

1. compile when the following 2 errors occur, please do not question whether the UnrealEngine4 engine compilation tool has a problem or the automatically generated project configuration has a problem, there is only one problem is their own code has a problem. As follows:

 
The
EXEC: error: Failed to generate code for XXXX (XXXX is the name of our project)
The
The and

 
The
EXEC: error: UnrealHeaderTool failed for target ‘PandaEditor’ (platform: Win64, module info: C: \ Users \ User \ Documents \ UnrealProjects/Panda/Intermediate/Build \ Win64 \ PandaEditor \ Development
\UnrealHeaderTool.manifest).

 
The
this error resolution: check the.h file for cross-references to header files. If you do need to refer to each other, try [+class] before your class name and then refer to header files in.cpP.

 
The
The

 
The
of course this error is
[UnrealHeaderTool],
[UnrealHeaderTool] error detection is not strong enough to accurately prompt for compilation errors, and many problems can cause this. If you find [EXEC: error: Failed to generate code for XX], please check the code carefully

How to set the custom blood bar UI in UE4 and how to call it

to set up a custom UI plug-in:

1. Select Widget Blueprint

2. Drag into a Horizontal Box, ProgressBar

3. Set control Size to Fill

4. Adjust the fill color and opacity of the control

3. Call

returns to the main UI design scenario, dragging the custom control, the health control, to the desired visit location.

as shown in the figure below:

The

effect is as follows: