AirSim icon indicating copy to clipboard operation
AirSim copied to clipboard

Build Airsim failed with Warnings C4819 and Errors C2220

Open Holdenpham opened this issue 2 years ago • 2 comments

When I run build.cmd in airsim directory, I have the below errors. Can you tell me the solution for this issues.

"G:\AirSim\AirSim.sln" (default target) (1) -> "G:\AirSim\MavLinkCom\MavLinkCom.vcxproj" (default target) (11) -> (ClCompile target) -> G:\AirSim\MavLinkCom\mavlink\mavlink_sha256.h(1,1): warning C4819: The file contains a character that cannot be represented in the current code page (932). Save the file in Unicode format to prevent data loss [G:\AirSim\Ma vLinkCom\MavLinkCom.vcxproj] G:\AirSim\MavLinkCom\mavlink\mavlink_sha256.h(1,1): warning C4819: The file contains a character that cannot be represented in the current code page (932). Save the file in Unicode format to prevent data loss [G:\AirSim\Ma vLinkCom\MavLinkCom.vcxproj] G:\AirSim\MavLinkCom\mavlink\mavlink_sha256.h(1,1): warning C4819: The file contains a character that cannot be represented in the current code page (932). Save the file in Unicode format to prevent data loss [G:\AirSim\Ma vLinkCom\MavLinkCom.vcxproj] G:\AirSim\MavLinkCom\mavlink\mavlink_sha256.h(1,1): warning C4819: The file contains a character that cannot be represented in the current code page (932). Save the file in Unicode format to prevent data loss [G:\AirSim\Ma vLinkCom\MavLinkCom.vcxproj] G:\AirSim\MavLinkCom\mavlink\mavlink_sha256.h(1,1): warning C4819: The file contains a character that cannot be represented in the current code page (932). Save the file in Unicode format to prevent data loss [G:\AirSim\Ma vLinkCom\MavLinkCom.vcxproj]

   "G:\AirSim\AirSim.sln" (default target) (1) ->
   "G:\AirSim\MavLinkCom\MavLinkCom.vcxproj" (default target) (11) ->
   (ClCompile target) ->
     G:\AirSim\MavLinkCom\mavlink\mavlink_sha256.h(1,1): error C2220: the following warning is treated as an error
   [G:\AirSim\MavLinkCom\MavLinkCom.vcxproj]
     G:\AirSim\MavLinkCom\mavlink\mavlink_sha256.h(1,1): error C2220: the following warning is treated as an error
   [G:\AirSim\MavLinkCom\MavLinkCom.vcxproj]
     G:\AirSim\MavLinkCom\mavlink\mavlink_sha256.h(1,1): error C2220: the following warning is treated as an error
   [G:\AirSim\MavLinkCom\MavLinkCom.vcxproj]
     G:\AirSim\MavLinkCom\mavlink\mavlink_sha256.h(1,1): error C2220: the following warning is treated as an error
   [G:\AirSim\MavLinkCom\MavLinkCom.vcxproj]
     G:\AirSim\MavLinkCom\mavlink\mavlink_sha256.h(1,1): error C2220: the following warning is treated as an error
   [G:\AirSim\MavLinkCom\MavLinkCom.vcxproj]

5 Warning(s)
5 Error(s)

Holdenpham avatar Jan 09 '23 08:01 Holdenpham

I got the same errors. Did the problem get resolved?

osqzss avatar Jul 01 '23 10:07 osqzss

I also got the same error. I solved this problem by editing the following file.

AirSim\MavLinkCom\mavlink\mavlink_sha256.h

This file has the following garbled characters, which should be fixed.

  • Copyright (c) 1995 - 2001 Kungliga Tekniska H?gskolan

I think this character does not support 932 (shift_jis). If you have other similar errors, you can fix them by correcting the unsupported character.

Syug0 avatar Feb 12 '24 19:02 Syug0