Hello!
I’m facing a curious compilation problem when trying to rename one class file from MyServerUploader.h/cpp to AsyncUploadToMyServer.h/cpp. This is the error I get:
Severity Code Description Project File Line Suppression State
Error MSB3075 The command ““C:\Program Files\Epic Games\UE_4.24\Engine\Build\BatchFiles\Build.bat” UploadToServerExampleEditor Win64 Development -Project=“C:\UnrealProjects\UploadToServerExample\UploadToServerExample.uproject” -WaitMutex -FromMsBuild” exited with code 5. Please verify that you have sufficient rights to run this command. UploadToServerExample C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets 44
Warning C4005 ‘TEXT’: macro redefinition UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winnt.h 584
Error C4668 ‘_WIN32_WINNT_WIN10_RS1’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 9995
Error C4668 ‘_WIN32_WINNT_WIN10_RS1’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 10040
Error C4668 ‘_WIN32_WINNT_WIN10_RS1’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 10048
Error C4668 ‘_WIN32_WINNT_WIN10_RS1’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 15367
Error C4668 ‘_WIN32_WINNT_WIN10_RS2’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 10011
Error C4668 ‘_WIN32_WINNT_WIN10_RS2’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 10021
Error C4668 ‘_WIN32_WINNT_WIN10_RS2’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 10246
Error C4668 ‘_WIN32_WINNT_WIN10_RS2’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 14857
Error C4668 ‘_WIN32_WINNT_WIN10_RS3’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 10030
Error C4668 ‘_WIN32_WINNT_WIN10_RS3’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 14821
Error C4668 ‘_WIN32_WINNT_WIN10_RS3’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 14838
Error C4668 ‘_WIN32_WINNT_WIN10_RS3’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 14976
Error C4668 ‘_WIN32_WINNT_WIN10_RS4’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 10037
Error C4668 ‘_WIN32_WINNT_WIN10_RS4’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 10043
Error C4668 ‘_WIN32_WINNT_WIN10_RS4’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 10831
Error C4668 ‘_WIN32_WINNT_WIN10_RS4’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 15126
Error C4668 ‘_WIN32_WINNT_WIN10_RS4’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 15139
Error C4668 ‘_WIN32_WINNT_WIN10_RS5’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 10051
Error C4668 ‘_WIN32_WINNT_WIN10_RS5’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 10270
Error C4668 ‘_WIN32_WINNT_WIN10_RS5’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 13662
Error C4668 ‘_WIN32_WINNT_WIN10_TH2’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 9989
Error C4668 ‘_WIN32_WINNT_WIN10_TH2’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 10000
Error C4668 ‘_WIN32_WINNT_WIN10_TH2’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 10004
Error C4668 ‘_WIN32_WINNT_WIN10_TH2’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if /#elif ’ UploadToServerExample C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winioctl.h 10025
I found a similar issue on the forum, pointing towards including C++ standard libs to the project. While I’m including a headless thirdy-party library inside MyServerUploader.cpp, everything runs fine as long as I don’t change the filename to anything starting with the letter ‘A’.
Am I missing something?
Would you guys have any ideas of what might be happening?
Update: I found out that the problem is raised depending the new name you choose.
If the new name comes **lexicographically **before another file I have in my project (MyServerPackager.h/cpp), the problem will be raised.
If the new name comes **lexicographically ****after **that file, everything will work fine.
For example, if I rename ‘MyServerUploader’ to ‘Abcd’, the problem will happen. If I rename it to ‘Xyz’ instead, everything will work fine.
Ideas?