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.
-
- There should be no files with the same name under the path
Read More:
- bazel Compile Error: absl/base/policy_checks.h:79:2: error: #error “C++ versions less than C++14 are not supported.”
- [Solved] Opencv Compile Error: (CMake Error: The following variables are used in this project, but they are set to not)
- Grpc Compilation issues: “C++ versions less than C++11 are not supported.
- [Solved] C++ Compile: error LNK2019: unresolved external “XX“
- [Solved] Error: error C2601: ‘b‘ : local function definitions are illegal error C2063: ‘b‘ : not a function
- C++ Compile Error: error: invalid conversion from ‘void*‘ to ‘char*‘ [-fpermissive]
- C++ clang Compile Error: error: expected unqualified-id
- [Solved] C + + compile Error: error: default argument given for parameter 3
- [Solved] Software Compile Error: xdo.c:29:34: fatal error: X11/extensions/XTest.h:
- [Solved] igb Compile Error: igb_main.c:10044:7: error: implicit declaration of function ‘isdigit’
- C++:error C2872: ‘byte‘: ambiguous symbol [How to Solve]
- How to Solve Fatal error stdatomic in C/C++ Compilation
- [Solved] Compile Error: cannot open include file ‘afxres.h‘
- [Solved] URIError: Failed to decode param ‘/%3C%=%20BASE_URL%20%3Estatic/index.%3C%=%20VUE_APP_INDEX_CSS_HASH%20%3E.css’
- OS.Removedirs() and shutil.Rmtree() are used to delete the folder
- The page you are requesting cannot be served because of the extension configuration
- [Solved] ORB_SLAM3 Compile Error: opencv4.0 not found four
- How to Solve UE5 Compile Error: Error MSB3073
- Using Jenkins to compile APK Error [How to Solve]
- [Solved] CUDA fails to compile in visual studio and throws error msb3721 and nvcc fatal