Не удалось собрать Freeopcua C ++ - PullRequest
0 голосов
/ 25 марта 2020

Я пытаюсь собрать opcua из источника: https://github.com/FreeOpcUa/freeopcua в Windows 10:

В соответствии с ответом: cmake v3.15.3 не может найти повышение v1.71.0 , я успешно скомпилировал исходный код и получил freeopcua.sln в моей папке сборки.

Однако, когда я попытался построить проекты через Visual Studio 2019, я получил следующие ошибки: Вывод из VS

Я также попытался запустить cmake --build ., затем я получил ту же ошибку.

E:\freeopcua\src\core\common\uri_facade_win.cpp(23,1): error C2511: 'void Common::Uri::Initialize(const char *,size_t)': overloaded member fun
ction not found in 'Common::Uri' [E:\freeopcua\build\opcuacore.vcxproj]
E:\freeopcua\include\opc/common/uri_facade.h(18): message : see declaration of 'Common::Uri' [E:\freeopcua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\common\uri_facade_win.cpp(34,6): warning C4267: 'argument': conversion from 'size_t' to 'DWORD', possible loss of data [
E:\freeopcua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\common\uri_facade_win.cpp(40,79): error C2597: illegal reference to non-static member 'Common::Uri::SchemeStr' [E:\freeo
pcua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\common\uri_facade_win.cpp(41,83): error C2597: illegal reference to non-static member 'Common::Uri::UserStr' [E:\freeopc
ua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\common\uri_facade_win.cpp(42,87): error C2597: illegal reference to non-static member 'Common::Uri::PasswordStr' [E:\fre
eopcua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\common\uri_facade_win.cpp(43,83): error C2597: illegal reference to non-static member 'Common::Uri::HostStr' [E:\freeopc
ua\build\opcuacore.vcxproj]
  value.cpp
  event.cpp
E:\freeopcua\src\core\common\uri_facade_win.cpp(44,22): error C2597: illegal reference to non-static member 'Common::Uri::PortNum' [E:\freeopc
ua\build\opcuacore.vcxproj]
E:\freeopcua\include\opc/ua/protocol/data_value.h(24,42): warning C4245: 'initializing': conversion from 'int' to 'uint8_t', signed/unsigned m
ismatch [E:\freeopcua\build\opcuacore.vcxproj]
  model_node.cpp
E:\freeopcua\include\opc/ua/node.h(88,32): warning C4101: 'e': unreferenced local variable [E:\freeopcua\build\opcuacore.vcxproj]
  model_object.cpp
E:\freeopcua\include\opc/ua/protocol/data_value.h(24,42): warning C4245: 'initializing': conversion from 'int' to 'uint8_t', signed/unsigned m
ismatch [E:\freeopcua\build\opcuacore.vcxproj]
E:\freeopcua\include\opc/ua/protocol/data_value.h(24,42): warning C4245: 'initializing': conversion from 'int' to 'uint8_t', signed/unsigned m
ismatch [E:\freeopcua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\model_object.cpp(111,48): warning C4100: 'name': unreferenced formal parameter [E:\freeopcua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\model_object.cpp(116,47): warning C4100: 'name': unreferenced formal parameter [E:\freeopcua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\model_object.cpp(299,88): warning C4100: 'type': unreferenced formal parameter [E:\freeopcua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\model_object.cpp(299,55): warning C4100: 'browseName': unreferenced formal parameter [E:\freeopcua\build\opcuacore.vcxpr
oj]
E:\freeopcua\src\core\model_object.cpp(304,118): warning C4100: 'type': unreferenced formal parameter [E:\freeopcua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\model_object.cpp(304,85): warning C4100: 'browseName': unreferenced formal parameter [E:\freeopcua\build\opcuacore.vcxpr
oj]
  model_object_type.cpp
E:\freeopcua\src\core\model_object.cpp(304,48): warning C4100: 'newVariableId': unreferenced formal parameter [E:\freeopcua\build\opcuacore.vc
xproj]
  model_server.cpp
E:\freeopcua\include\opc/ua/protocol/data_value.h(24,42): warning C4245: 'initializing': conversion from 'int' to 'uint8_t', signed/unsigned m
ismatch [E:\freeopcua\build\opcuacore.vcxproj]
  model_variable.cpp
E:\freeopcua\include\opc/ua/protocol/data_value.h(24,42): warning C4245: 'initializing': conversion from 'int' to 'uint8_t', signed/unsigned m
ismatch [E:\freeopcua\build\opcuacore.vcxproj]
  node.cpp
E:\freeopcua\include\opc/ua/protocol/data_value.h(24,42): warning C4245: 'initializing': conversion from 'int' to 'uint8_t', signed/unsigned m
ismatch [E:\freeopcua\build\opcuacore.vcxproj]
E:\freeopcua\include\opc/ua/protocol/data_value.h(24,42): warning C4245: 'initializing': conversion from 'int' to 'uint8_t', signed/unsigned m
ismatch [E:\freeopcua\build\opcuacore.vcxproj]
E:\freeopcua\include\opc/ua/node.h(88,32): warning C4101: 'e': unreferenced local variable [E:\freeopcua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\node.cpp(257,25): warning C4244: 'initializing': conversion from 'uint32_t' to 'uint16_t', possible loss of data [E:\fre
eopcua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\node.cpp(332,36): warning C4244: 'argument': conversion from 'uint32_t' to 'uint16_t', possible loss of data [E:\freeopc
ua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\node.cpp(372,36): warning C4244: 'argument': conversion from 'uint32_t' to 'uint16_t', possible loss of data [E:\freeopc
ua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\node.cpp(404,36): warning C4244: 'argument': conversion from 'uint32_t' to 'uint16_t', possible loss of data [E:\freeopc
ua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\node.cpp(457,36): warning C4244: 'argument': conversion from 'uint32_t' to 'uint16_t', possible loss of data [E:\freeopc
ua\build\opcuacore.vcxproj]
  opcua_errors.cpp
  socket_channel.cpp
E:\freeopcua\src\core\node.cpp(507,36): warning C4244: 'argument': conversion from 'uint32_t' to 'uint16_t', possible loss of data [E:\freeopc
ua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\socket_channel.cpp(53,3): error C3861: 'close': identifier not found [E:\freeopcua\build\opcuacore.vcxproj]
E:\freeopcua\src\core\socket_channel.cpp(58,54): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data [E:\freeo
pcua\build\opcuacore.vcxproj]
  subscription.cpp
E:\freeopcua\src\core\socket_channel.cpp(75,43): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data [E:\freeo
pcua\build\opcuacore.vcxproj]
E:\freeopcua\include\opc/ua/protocol/data_value.h(24,42): warning C4245: 'initializing': conversion from 'int' to 'uint8_t', signed/unsigned m
ismatch [E:\freeopcua\build\opcuacore.vcxproj]
  Generating Code...
E:\freeopcua\include\opc/ua/node.h(88,32): warning C4101: 'e': unreferenced local variable [E:\freeopcua\build\opcuacore.vcxproj]
  Compiling...
  server_operations.cpp
E:\freeopcua\src\core\node.cpp(207): warning C4702: unreachable code [E:\freeopcua\build\opcuacore.vcxproj]
E:\freeopcua\include\opc/ua/protocol/data_value.h(24,42): warning C4245: 'initializing': conversion from 'int' to 'uint8_t', signed/unsigned m
ismatch [E:\freeopcua\build\opcuacore.vcxproj]
  Generating Code...
E:\freeopcua\include\opc/ua/node.h(88,32): warning C4101: 'e': unreferenced local variable [E:\freeopcua\build\opcuacore.vcxproj]
...