Я пытаюсь создать образец проекта Azure IoT Gateway SDK с утилитой CMake 3,71 для Visual Studio 2015 на платформе Windows 10. Когда я пытался построить проект как в VS2015 командной строке и CMake GUI, соответственно, я получил следующий журнал ошибок:
Determining if the _M_AMD64 exist failed with the following output:
Change Dir: C:/Users/nanos/Documents/GitHub/project/azure-iot-gateway-sdk/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe" "cmTC_23e97.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=14.0"
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 12/6/2016 1:53:03 AM.
Project "C:\Users\nanos\Documents\GitHub\project\azure-iot-gateway-sdk\build\CMakeFiles\CMakeTmp\cmTC_23e97.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTC_23e97.dir\Debug\".
Creating directory "C:\Users\nanos\Documents\GitHub\project\azure-iot-gateway-sdk\build\CMakeFiles\CMakeTmp\Debug\".
Creating directory "cmTC_23e97.dir\Debug\cmTC_23e97.tlog\".
InitializeBuildStatus:
Creating "cmTC_23e97.dir\Debug\cmTC_23e97.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_23e97.dir\Debug\\" /Fd"cmTC_23e97.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue "C:\Users\nanos\Documents\GitHub\project\azure-iot-gateway-sdk\build\CMakeFiles\CMakeTmp\CheckSymbolExists.c"
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_23e97.dir\Debug\\" /Fd"cmTC_23e97.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue "C:\Users\nanos\Documents\GitHub\project\azure-iot-gateway-sdk\build\CMakeFiles\CMakeTmp\CheckSymbolExists.c"
CheckSymbolExists.c
C:\Users\nanos\Documents\GitHub\project\azure-iot-gateway-sdk\build\CMakeFiles\CMakeTmp\CheckSymbolExists.c(7): error C2065: '_M_AMD64': undeclared identifier [C:\Users\nanos\Documents\GitHub\project\azure-iot-gateway-sdk\build\CMakeFiles\CMakeTmp\cmTC_23e97.vcxproj]
Done Building Project "C:\Users\nanos\Documents\GitHub\project\azure-iot-gateway-sdk\build\CMakeFiles\CMakeTmp\cmTC_23e97.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\nanos\Documents\GitHub\project\azure-iot-gateway-sdk\build\CMakeFiles\CMakeTmp\cmTC_23e97.vcxproj" (default target) (1) ->
(ClCompile target) ->
C:\Users\nanos\Documents\GitHub\project\azure-iot-gateway-sdk\build\CMakeFiles\CMakeTmp\CheckSymbolExists.c(7): error C2065: '_M_AMD64': undeclared identifier [C:\Users\nanos\Documents\GitHub\project\azure-iot-gateway-sdk\build\CMakeFiles\CMakeTmp\cmTC_23e97.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.65
File C:/Users/nanos/Documents/GitHub/project/azure-iot-gateway-sdk/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
int main(int argc, char** argv)
{
(void)argv;
#ifndef _M_AMD64
return ((int*)(&_M_AMD64))[argc];
#else
(void)argc;
return 0;
#endif
}
================== ================================================== =====Строительство Azure IoT Gateway SDK Solution с утилитой CMake
Output from the CMake GUI here
Может кто-нибудь сказать мне, что я делаю неправильно или наставит меня? Я потратил значительное количество часов, пытаясь выяснить, как решить проблему. Я активно искал решения в Интернете, но безуспешно.
Заранее спасибо
В каком учебнике вы узнали? –
Спасибо, Рита. В качестве руководства я использовал следующий учебник: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-windows-gateway-sdk-simulated-device – KKUser
Как насчет печатного контента в окне команд , Вы видели ** «100% тестов прошли, 0 тестов не удалось из 16» ** после завершения сборки? –