Airsim: build.cmd error

Created on 27 Jul 2018  ·  6Comments  ·  Source: microsoft/AirSim

hi! i downloaded the latest version airsim 1.2. and i build it on window 10.(use build.cmd). but i have compile error and warning.

c:\program files (x86)\windows kits\8.1\include\um\shlobj.h(1054): error C2220
c:\program files (x86)\windows kits\8.1\include\um\shlobj.h(1054): warning C4091

question

Most helpful comment

Update: My being unable to access the API calls was unrelated to the fix as I figured out what was going wrong with that (I was not using 8.x C++ libs on accident). Turning off the setting Treat Error As Warning for the projects AirLib and MavLinkCom in both Debug and Release mode on the x64 setting. After that, the build process should work normally.

All 6 comments

I am not able to reproduce this error. Do you have VC++ installed? Also, could you please copy paste full error message?

i have VC++ installed. and there are full error message.

InitializeBuildStatus:
"C:\Users\HP\Desktop\AirSim-master\MavLinkCom\temp\MavLinkCom\x64\Debug\MavLinkCom.tlog\unsuccessfulbuild"에 연결(touchi
ng)하고 있습니다.
ClCompile:
c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\CL.exe /c /Ic
ommon_utils /Iinclude /ZI /nologo /W3 /WX /diagnostics:classic /Od /D _WIN32 /D _WIN32_WINNT=0x0600 /D NOMINMAX /D VC
_EXTRALEAN /D _SCL_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_WARNINGS /D _DEBUG /D _LIB /D _UNICODE /D UNICODE /Gm- /EHsc
/RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"C:\Users\HP\Desktop\AirSim-master\MavLinkCom\temp\
MavLinkCom\x64\Debug\" /Fd"C:\Users\HP\Desktop\AirSim-master\MavLinkCom\temp\MavLinkCom\x64\Debug\MavLinkCom.pdb" /F
R"C:\Users\HP\Desktop\AirSim-master\MavLinkCom\temp\MavLinkCom\x64\Debug\" /Gd /TP /FC /errorReport:queue common_uti
ls\FileSystem.cpp
FileSystem.cpp
c:\program files (x86)\windows kits\8.1\include\um\shlobj.h(1054): error C2220: warning treated as error - no 'object'
file generated [C:\Users\HP\Desktop\AirSim-master\MavLinkCom\MavLinkCom.vcxproj]
c:\program files (x86)\windows kits\8.1\include\um\shlobj.h(1054): warning C4091: 'typedef ': ignored on left of 'tagGP
FIDL_FLAGS' when no variable is declared [C:\Users\HP\Desktop\AirSim-master\MavLinkCom\MavLinkCom.vcxproj]

I'm having the same problem as wkvkfkeh.

Here is error output from build.cmd (edited)
"AirSim.sln" (default target) (1) ->
"DroneShell\DroneShell.vcxproj" (default target) (2) ->
"AirLib\AirLib.vcxproj" (default target) (3) ->
(ClCompile target) ->
c:\program files (x86)\windows kits\8.1\include\um\shlobj.h(1054): error C2220: warning treated as error - no 'object
' file generated [AirLib\AirLib.vcxproj]

When I compile AIrlib in Visual Studio 2017 with treating warnings as errors allowed, I also get the same two error and warning lines found in wkvkfeh's output.
c:\program files (x86)\windows kits\8.1\include\um\shlobj.h(1054): error C2220: warning treated as error - no 'object' file generated
2>c:\program files (x86)\windows kits\8.1\include\um\shlobj.h(1054): warning C4091: 'typedef ': ignored on left of 'tagGPFIDL_FLAGS' when no variable is declared.

It appears that if you disable treating warnings as errors in the projects AirLib and MavLinkCom, the code will compile. This is the best solution that I have found so far.

I think turning treat warnings as errors off creates or enables issues with sending API commands to AirSim; I have not been able to get the C++ HelloDrone or C++ HelloCar to work. (However, I can connect; this may just be something wrong with my settings.json).

Update: My being unable to access the API calls was unrelated to the fix as I figured out what was going wrong with that (I was not using 8.x C++ libs on accident). Turning off the setting Treat Error As Warning for the projects AirLib and MavLinkCom in both Debug and Release mode on the x64 setting. After that, the build process should work normally.

@wkvkfkeh can you try to build it again? I think this is not an airsim issue. Yo can try with latest version too.

Closed. Old and We were not able to reproduce

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zywOwO picture zywOwO  ·  3Comments

git-moeen picture git-moeen  ·  4Comments

zbenic picture zbenic  ·  4Comments

p3jawors picture p3jawors  ·  3Comments

kharyal picture kharyal  ·  3Comments