Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arcus in 64bit windows #64

Closed
yingzhang1109 opened this issue Aug 18, 2017 · 8 comments
Closed

arcus in 64bit windows #64

yingzhang1109 opened this issue Aug 18, 2017 · 8 comments

Comments

@yingzhang1109
Copy link

I am trying to set up arcus with Python bonding in 64-bit windows. I successfully installed protobuf. Any detail suggestion on how to use Microsoft Visual C++ to build Arcus in 64-bit windows?

@yingzhang1109
Copy link
Author

yingzhang1109 commented Aug 18, 2017

Here is the command line I have try

D:\VS\VC>cd D:\Engine\libArcus-2.6\build

D:\Engine\libArcus-2.6\build>cmake -DCMAKE_INSTALL_PREFIX=../install_dir -DBUILD_STATIC=ON -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" ..
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: D:/VS/VC/bin/cl.exe
-- Check for working C compiler: D:/VS/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: D:/VS/VC/bin/cl.exe
-- Check for working CXX compiler: D:/VS/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at C:/Program Files (x86)/CMake/share/cmake-3.8/Modules/FindProtobuf.cmake:387 (message):
Protobuf compiler version doesn't match library version 3.4.0
Call Stack (most recent call first):
CMakeLists.txt:20 (find_package)

-- Found Protobuf: C:/Program Files (x86)/protobuf/lib (found suitable version "3.4.0", minimum required is "3.0.0")
-- Found PythonInterp: D:/python/python.exe (found suitable version "3.5.3", minimum required is "3.4.0")
-- Found PythonLibs: D:/python/libs/python35.lib (found suitable version "3.5.3", minimum required is "3.4.0")
-- Found SIP version: 4.19.3
-- Configuring done
WARNING: Target "Arcus" requests linking to directory "C:/Program Files (x86)/protobuf/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "python_module_Arcus" requests linking to directory "C:/Program Files (x86)/protobuf/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "Arcus" requests linking to directory "C:/Program Files (x86)/protobuf/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "example" requests linking to directory "C:/Program Files (x86)/protobuf/lib". Targets may link only to libraries. CMake is dropping the item.
-- Generating done
-- Build files have been written to: D:/Engine/libArcus-2.6/build

D:\Engine\libArcus-2.6\build>nmake

Microsoft (R) 程序维护实用工具 14.00.24210.0 版
版权所有 (C) Microsoft Corporation。 保留所有权利。

Scanning dependencies of target Arcus
[ 4%] Building CXX object CMakeFiles/Arcus.dir/src/Socket.cpp.obj
Socket.cpp
C:\PROGRA2\protobuf\include\google/protobuf/io/coded_stream.h(870): warning C4800: “google::protobuf::internal::AtomicWord”: 将值强制为布尔值“true”或“false”(性能警告)
C:\PROGRA
2\protobuf\include\google/protobuf/io/coded_stream.h(874): warning C4800: “google::protobuf::internal::Atomic32”: 将值强制为布尔值“true”或“false”(性能警告)
[ 9%] Building CXX object CMakeFiles/Arcus.dir/src/SocketListener.cpp.obj
SocketListener.cpp
[ 13%] Building CXX object CMakeFiles/Arcus.dir/src/MessageTypeStore.cpp.obj
MessageTypeStore.cpp
C:\PROGRA2\protobuf\include\google/protobuf/io/coded_stream.h(870): warning C4800: “google::protobuf::internal::AtomicWord”: 将值强制为布尔值“true”或“false”(性能警告)
C:\PROGRA
2\protobuf\include\google/protobuf/io/coded_stream.h(874): warning C4800: “google::protobuf::internal::Atomic32”: 将值强制为布尔值“true”或“false”(性能警告)
C:\PROGRA~2\protobuf\include\google/protobuf/generated_message_util.h(160): warning C4800: “google::protobuf::uint32”: 将值强制为布尔值“true”或“false”(性能警告)
[ 18%] Building CXX object CMakeFiles/Arcus.dir/src/PlatformSocket.cpp.obj
PlatformSocket.cpp
[ 22%] Building CXX object CMakeFiles/Arcus.dir/src/Error.cpp.obj
Error.cpp
[ 27%] Linking CXX static library Arcus.lib
[ 27%] Built target Arcus
[ 31%] Generating python/sipArcuspart0.cpp, python/sipArcuspart1.cpp, python/sipArcuspart2.cpp, python/sipArcuspart3.cpp, python/sipArcuspart4.cpp, python/sipArcuspart5.cpp, python/sipArcuspart6.cpp, python/sipArcuspart7.cpp

Scanning dependencies of target python_module_Arcus
[ 36%] Building CXX object CMakeFiles/python_module_Arcus.dir/python/sipArcuspart0.cpp.obj
sipArcuspart0.cpp
[ 40%] Building CXX object CMakeFiles/python_module_Arcus.dir/python/sipArcuspart1.cpp.obj
sipArcuspart1.cpp
[ 45%] Building CXX object CMakeFiles/python_module_Arcus.dir/python/sipArcuspart2.cpp.obj
sipArcuspart2.cpp
[ 50%] Building CXX object CMakeFiles/python_module_Arcus.dir/python/sipArcuspart3.cpp.obj
sipArcuspart3.cpp
[ 54%] Building CXX object CMakeFiles/python_module_Arcus.dir/python/sipArcuspart4.cpp.obj
sipArcuspart4.cpp
[ 59%] Building CXX object CMakeFiles/python_module_Arcus.dir/python/sipArcuspart5.cpp.obj
sipArcuspart5.cpp
[ 63%] Building CXX object CMakeFiles/python_module_Arcus.dir/python/sipArcuspart6.cpp.obj
sipArcuspart6.cpp
[ 68%] Building CXX object CMakeFiles/python_module_Arcus.dir/python/sipArcuspart7.cpp.obj
sipArcuspart7.cpp
[ 72%] Building CXX object CMakeFiles/python_module_Arcus.dir/python/PythonMessage.cpp.obj
PythonMessage.cpp
D:\Engine\libArcus-2.6\python\PythonMessage.cpp(61): warning C4800: “const google::protobuf::FieldDescriptor *”: 将值强制为布尔值“true”或“false”(性能警告)
D:\Engine\libArcus-2.6\python\PythonMessage.cpp(129): warning C4244: “参数”: 从“double”转换到“float”,可能丢失数据
[ 77%] Linking CXX shared library Arcus.pyd
正在创建库 _Arcus.lib 和对象 _Arcus.exp
sipArcuspart0.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyBool_FromLong,该符号在函数 _meth_Socket_registerAllMessageTypes 中被引用
sipArcuspart1.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyBool_FromLong
sipArcuspart2.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyBool_FromLong
sipArcuspart0.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyDict_GetItemString,该符号在函数 _PyInit_Arcus 中被引用
sipArcuspart0.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyModule_GetDict,该符号在函数 _PyInit_Arcus 中被引用
sipArcuspart0.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyCapsule_GetPointer,该符号在函数 _PyInit_Arcus 中被引用
sipArcuspart0.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyModule_Create2,该符号在函数 _PyInit_Arcus 中被引用
sipArcuspart4.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyEval_SaveThread
sipArcuspart0.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyEval_SaveThread
sipArcuspart1.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyEval_SaveThread
sipArcuspart2.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyEval_SaveThread
sipArcuspart3.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyEval_SaveThread
sipArcuspart4.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyEval_RestoreThread
sipArcuspart0.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyEval_RestoreThread
sipArcuspart1.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyEval_RestoreThread
sipArcuspart2.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyEval_RestoreThread
sipArcuspart3.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyEval_RestoreThread
sipArcuspart0.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyImport_ImportModule,该符号在函数 _PyInit_Arcus 中被引用
sipArcuspart4.cpp.obj : error LNK2001: 无法解析的外部符号 __imp___Py_NoneStruct
sipArcuspart0.cpp.obj : error LNK2001: 无法解析的外部符号 __imp___Py_NoneStruct
sipArcuspart1.cpp.obj : error LNK2001: 无法解析的外部符号 __imp___Py_NoneStruct
sipArcuspart2.cpp.obj : error LNK2001: 无法解析的外部符号 __imp___Py_NoneStruct
sipArcuspart3.cpp.obj : error LNK2001: 无法解析的外部符号 __imp___Py_NoneStruct
sipArcuspart0.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyCapsule_Type,该符号在函数 _PyInit_Arcus 中被引用
sipArcuspart1.cpp.obj : error LNK2019: 无法解析的外部符号 _imp__PyUnicode_FromString,该符号在函数 slot_Error___repr 中被引用
PythonMessage.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyUnicode_FromString
sipArcuspart2.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyLong_FromLong,该符号在函数 _meth_PythonMessage_repeatedMessageCount 中被引用
PythonMessage.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyLong_FromLong
sipArcuspart2.cpp.obj : error LNK2019: 无法解析的外部符号 _imp__PyErr_SetString,该符号在函数 slot_PythonMessage___setattr 中被引用
sipArcuspart3.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyErr_SetString
PythonMessage.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyErr_SetString
sipArcuspart2.cpp.obj : error LNK2019: 无法解析的外部符号 _imp__PyExc_NotImplementedError,该符号在函数 slot_PythonMessage___setattr 中被引用
sipArcuspart3.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyExc_ValueError,该符号在函数 _convertTo_MessagePtr 中被引用
PythonMessage.cpp.obj : error LNK2001: 无法解析的外部符号 __imp__PyExc_ValueError
sipArcuspart4.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyBytes_FromString,该符号在函数 _convertFrom_std_string 中被引用
sipArcuspart4.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyUnicode_AsEncodedString,该符号在函数 _convertTo_std_string 中被引用
sipArcuspart4.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyUnicode_DecodeUTF8,该符号在函数 _convertFrom_std_string 中被引用
sipArcuspart4.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyErr_Clear,该符号在函数 _convertFrom_std_string 中被引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyBytes_FromStringAndSize,该符号在函数 "public: struct _object * __thiscall Arcus::PythonMessage::getattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)const " (?getattr@PythonMessage@Arcus@@QBEPAU_object@@abv?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) 中被引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyUnicode_AsUTF8,该符号在函数 "public: void __thiscall Arcus::PythonMessage::setattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,struct _object *)" (?setattr@PythonMessage@Arcus@@QAEXABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@PAU_object@@@z) 中被 引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyLong_FromUnsignedLong,该符号在函数 "public: struct _object * __thiscall Arcus::PythonMessage::getattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)const " (?getattr@PythonMessage@Arcus@@QBEPAU_object@@abv?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) 中被引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyLong_AsLong,该符号在函数 "public: void __thiscall Arcus::PythonMessage::setattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,struct _object *)" (?setattr@PythonMessage@Arcus@@QAEXABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@PAU_object@@@z) 中被引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyLong_AsUnsignedLong,该符号在函数 "public: void __thiscall Arcus::PythonMessage::setattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,struct _object *)" (?setattr@PythonMessage@Arcus@@QAEXABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@PAU_object@@@z) 中被引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyLong_FromLongLong,该符号在函数 "public: struct _object * __thiscall Arcus::PythonMessage::getattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)const " (?getattr@PythonMessage@Arcus@@QBEPAU_object@@abv?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) 中被引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyLong_FromUnsignedLongLong,该符号在函数 "public: struct _object * __thiscall Arcus::PythonMessage::getattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)const " (?getattr@PythonMessage@Arcus@@QBEPAU_object@@abv?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) 中被引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyLong_AsLongLong,该符号在函数 "public: void __thiscall Arcus::PythonMessage::setattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,struct _object *)" (?setattr@PythonMessage@Arcus@@QAEXABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@PAU_object@@@z) 中被引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyLong_AsUnsignedLongLong,该符号在函数 "public: void __thiscall Arcus::PythonMessage::setattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,struct _object *)" (?setattr@PythonMessage@Arcus@@QAEXABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@PAU_object@@@z) 中被引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyFloat_FromDouble,该符号在函数 "public: struct _object * __thiscall Arcus::PythonMessage::getattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)const " (?getattr@PythonMessage@Arcus@@QBEPAU_object@@abv?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) 中 被引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyFloat_AsDouble,该符号在函数 "public: void __thiscall Arcus::PythonMessage::setattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,struct _object *)" (?setattr@PythonMessage@Arcus@@QAEXABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@PAU_object@@@z) 中被 引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyObject_GetBuffer,该符号在函数 "public: void __thiscall Arcus::PythonMessage::setattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,struct _object *)" (?setattr@PythonMessage@Arcus@@QAEXABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@PAU_object@@@z) 中 被引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 "public: class google::protobuf::FieldDescriptor const * __thiscall google::protobuf::Descriptor::FindFieldByName(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)const " (?FindFieldByName@Descriptor@protobuf@google@@QBEPBVFieldDescriptor@23@ABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z),该符号在函数 "public: struct _object * __thiscall Arcus::PythonMessage::getattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)const " (?getattr@PythonMessage@Arcus@@QBEPAU_object@@abv?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) 中被引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 "public: class google::protobuf::EnumValueDescriptor const * __thiscall google::protobuf::Descriptor::FindEnumValueByName(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)const " (?FindEnumValueByName@Descriptor@protobuf@google@@QBEPBVEnumValueDescriptor@23@ABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z),该符号在函数 "public: void __thiscall Arcus::PythonMessage::setattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,struct _object *)" (?setattr@PythonMessage@Arcus@@QAEXABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@PAU_object@@@z) 中被引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 "public: enum google::protobuf::FieldDescriptor::Type __thiscall google::protobuf::FieldDescriptor::type(void)const " (?type@FieldDescriptor@protobuf@google@@qbe?AW4Type@123@XZ),该符号在函数 "public: struct _object * __thiscall Arcus::PythonMessage::getattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)const " (?getattr@PythonMessage@Arcus@@QBEPAU_object@@abv?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) 中被引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 __imp___Py_FalseStruct,该符号在函数 "public: struct _object * __thiscall Arcus::PythonMessage::getattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)const " (?getattr@PythonMessage@Arcus@@QBEPAU_object@@abv?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) 中被引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 __imp___Py_TrueStruct,该符号在函数 "public: struct _object * __thiscall Arcus::PythonMessage::getattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)const " (?getattr@PythonMessage@Arcus@@QBEPAU_object@@abv?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) 中被引 用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyExc_AttributeError,该符号在函数 "public: struct _object * __thiscall Arcus::PythonMessage::getattr(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)const " (?getattr@PythonMessage@Arcus@@QBEPAU_object@@abv?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) 中被引用
PythonMessage.cpp.obj : error LNK2019: 无法解析的外部符号 __imp__PyExc_IndexError,该符号在函数 "public: class Arcus::PythonMessage * __thiscall Arcus::PythonMessage::getRepeatedMessage(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,int)" (?getRepeatedMessage@PythonMessage@Arcus@@QAEPAV12@ABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@h@Z) 中被引用
Arcus.lib(Socket.cpp.obj) : error LNK2019: 无法解析的外部符号 "public: bool __thiscall google::protobuf::MessageLite::ParseFromCodedStream(class google::protobuf::io::CodedInputStream *)" (?ParseFromCodedStream@MessageLite@protobuf@google@@QAE_NPAVCodedInputStream@io@23@@z),该符号在函数 "public: void __thiscall Arcus::Socket::Private::handleMessage(class std::shared_ptr const &)" (?handleMessage@Private@Socket@Arcus@@QAEXABV?$shared_ptr@VWireMessage@Private@Arcus@@@std@@@z) 中被引用
Arcus.lib(Socket.cpp.obj) : error LNK2019: 无法解析的外部符号 "public: class std::basic_string<char,struct std::char_traits,class std::allocator > __thiscall google::protobuf::MessageLite::SerializeAsString(void)const " (?SerializeAsString@MessageLite@protobuf@google@@qbe?AV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@xz),该符号在函数 "public: void __thiscall Arcus::Socket::Private::sendMessage(class std::shared_ptr const &)" (?sendMessage@Private@Socket@Arcus@@QAEXABV?$shared_ptr@VMessage@protobuf@google@@@std@@@z) 中被引 用
Arcus.lib(Socket.cpp.obj) : error LNK2019: 无法解析的外部符号 "public: __thiscall google::protobuf::io::ArrayInputStream::ArrayInputStream(void const *,int,int)" (??0ArrayInputStream@io@protobuf@google@@QAE@PBXHH@Z),该符号在函数 "public: void __thiscall Arcus::Socket::Private::handleMessage(class std::shared_ptr const &)" (?handleMessage@Private@Socket@Arcus@@QAEXABV?$shared_ptr@VWireMessage@Private@Arcus@@@std@@@z) 中被引用
Arcus.lib(Socket.cpp.obj) : error LNK2019: 无法解析的外部符号 "public: __thiscall google::protobuf::io::CodedInputStream::~CodedInputStream(void)" (??1CodedInputStream@io@protobuf@google@@QAE@XZ),该符号在函数 "public: void __thiscall Arcus::Socket::Private::handleMessage(class std::shared_ptr const &)" (?handleMessage@Private@Socket@Arcus@@QAEXABV?$shared_ptr@VWireMessage@Private@Arcus@@@std@@@z) 中被引用
Arcus.lib(Socket.cpp.obj) : error LNK2019: 无法解析的外部符号 "public: void __thiscall google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int,int)" (?SetTotalBytesLimit@CodedInputStream@io@protobuf@google@@QAEXHH@Z),该符号在函数 "public: void __thiscall Arcus::Socket::Private::handleMessage(class std::shared_ptr const &)" (?handleMessage@Private@Socket@Arcus@@QAEXABV?$shared_ptr@VWireMessage@Private@Arcus@@@std@@@z) 中被引用
Arcus.lib(Socket.cpp.obj) : error LNK2019: 无法解析的外部符号 "private: bool __thiscall google::protobuf::io::CodedInputStream::Refresh(void)" (?Refresh@CodedInputStream@io@protobuf@google@@AAE_NXZ),该符号在函数 "public: thiscall google::protobuf::io::CodedInputStream::CodedInputStream(class google::protobuf::io::ZeroCopyInputStream *)" (??0CodedInputStream@io@protobuf@google@@QAE@PAVZeroCopyInputStream@123@@z) 中被引用
Arcus.lib(Socket.cpp.obj) : error LNK2019: 无法解析的外部符号 "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit
" (?default_recursion_limit
@CodedInputStream@io@protobuf@google@@0Ha),该符号在函数 "public: __thiscall google::protobuf::io::CodedInputStream::CodedInputStream(class google::protobuf::io::ZeroCopyInputStream *)" (??0CodedInputStream@io@protobuf@google@@QAE@PAVZeroCopyInputStream@123@@z) 中被引用
Arcus.lib(MessageTypeStore.cpp.obj) : error LNK2019: 无法解析的外部符号 "public: __thiscall google::protobuf::DynamicMessageFactory::DynamicMessageFactory(void)" (??0DynamicMessageFactory@protobuf@google@@QAE@XZ),该符号在函数 "public: __thiscall std::_Ref_count_obj::_Ref_count_obj<>(void)" (??$?0$$V@?$_Ref_count_obj@VDynamicMessageFactory@protobuf@google@@@std@@QAE@XZ) 中被引用
Arcus.lib(MessageTypeStore.cpp.obj) : error LNK2019: 无法解析的外部符号 "public: __thiscall google::protobuf::compiler::Importer::Importer(class google::protobuf::compiler::SourceTree *,class google::protobuf::compiler::MultiFileErrorCollector *)" (??0Importer@compiler@protobuf@google@@QAE@PAVSourceTree@123@PAVMultiFileErrorCollector@123@@z),该符号在函数 "public: __thiscall std::_Ref_count_obj::_Ref_count_obj<class google::protobuf::compiler::DiskSourceTree *,class ErrorCollector *>(class google::protobuf::compiler::DiskSourceTree * &&,class ErrorCollector * &&)" (??$?0PAVDiskSourceTree@compiler@protobuf@google@@PAVErrorCollector@@@?$_Ref_count_obj@VImporter@compiler@protobuf@google@@@std@@QAE@$$QAPAVDiskSourceTree@compiler@protobuf@google@@$$QAPAVErrorCollector@@@z) 中被引用
Arcus.lib(MessageTypeStore.cpp.obj) : error LNK2019: 无法解析的外部符号 "public: __thiscall google::protobuf::compiler::Importer::~Importer(void)" (??1Importer@compiler@protobuf@google@@QAE@XZ),该符号在函数 "public: void * __thiscall google::protobuf::compiler::Importer::`scalar deleting destructor'(unsigned int)" (??_GImporter@compiler@protobuf@google@@QAEPAXI@Z) 中被引用
Arcus.lib(MessageTypeStore.cpp.obj) : error LNK2019: 无法解析的外部符号 "public: class google::protobuf::FileDescriptor const * __thiscall google::protobuf::compiler::Importer::Import(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (?Import@Importer@compiler@protobuf@google@@QAEPBVFileDescriptor@34@ABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z),该符号在函数 "public: bool __thiscall Arcus::MessageTypeStore::registerAllMessageTypes(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (?registerAllMessageTypes@MessageTypeStore@Arcus@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) 中被引用
Arcus.lib(MessageTypeStore.cpp.obj) : error LNK2019: 无法解析的外部符号 "public: virtual __thiscall google::protobuf::compiler::MultiFileErrorCollector::~MultiFileErrorCollector(void)" (??1MultiFileErrorCollector@compiler@protobuf@google@@UAE@XZ),该符号在函数 __unwindfunclet$??0ErrorCollector@@QAE@XZ$0 中被引用
Arcus.lib(MessageTypeStore.cpp.obj) : error LNK2019: 无法解析的外部符号 "public: __thiscall google::protobuf::compiler::DiskSourceTree::DiskSourceTree(void)" (??0DiskSourceTree@compiler@protobuf@google@@QAE@XZ),该符号在函数 "public: __thiscall std::_Ref_count_obj::_Ref_count_obj<>(void)" (??$?0$$V@?$_Ref_count_obj@VDiskSourceTree@compiler@protobuf@google@@@std@@QAE@XZ) 中被引用
Arcus.lib(MessageTypeStore.cpp.obj) : error LNK2019: 无法解析的外部符号 "public: void __thiscall google::protobuf::compiler::DiskSourceTree::MapPath(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (?MapPath@DiskSourceTree@compiler@protobuf@google@@QAEXABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@0@Z),该符号在函数 "public: bool __thiscall Arcus::MessageTypeStore::registerAllMessageTypes(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (?registerAllMessageTypes@MessageTypeStore@Arcus@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) 中被引用
D:\python\libs\python35.lib : warning LNK4272:库计算机类型“x64”与目标计算机类型“X86”冲突
Arcus.pyd : fatal error LNK1120: 52 个无法解析的外部命令
LINK failed. with 1120
NMAKE : fatal error U1077: “"C:\Program Files (x86)\CMake\bin\cmake.exe"”: 返回代码“0xffffffff”
Stop.
NMAKE : fatal error U1077: “D:\VS\VC\BIN\nmake.exe”: 返回代码“0x2”
Stop.
NMAKE : fatal error U1077: “D:\VS\VC\BIN\nmake.exe”: 返回代码“0x2”
Stop.

@LipuFei
Copy link
Contributor

LipuFei commented Aug 18, 2017

@yingzhang1109 From the errors you get, looks like you have the following issues:

  • In the terminal, make sure you have initialised the VC++ 64bit build environment. Using Visual Studio 2015 as an example, you need to run this command (make sure the path is suitable for you) to initialise the environment: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarall.bat amd64
  • After that, use this terminal to compile protobuf and libArcus. Otherwise, they may have their binary files for different architectures, which won't work during linking.
  • Some errors you have got complain about not being able to find protobuf symbols. This means your linker cannot find the protobuf library. You can use this PROTOBUF_LIBRARIES cmake flag to specify where the protobuf library is. Example: cmake -DPROTOBUF_LIBRARIES=<your-protobuf-path> <some-other-flags>

@LipuFei
Copy link
Contributor

LipuFei commented Aug 18, 2017

Also see #29. There is some useful information.

@yingzhang1109
Copy link
Author

@LipuFei thanks for your answer. I am wondering is it ok if I use MinGW files to compile protobuf and use VS to compile Arcus?

@yingzhang1109
Copy link
Author

@LipuFei That's the compiler I use. I believe it's 64 bit, but it's still not working. is it the right compiler?
image

@Ghostkeeper
Copy link
Contributor

You should use the same compiler for Protobuf and Arcus. Otherwise linking will still go wrong. On Windows you would need to compile both Protobuf and Arcus twice: Once for the Python bindings using MSVC, and once for CuraEngine using MinGW.

@LipuFei
Copy link
Contributor

LipuFei commented Oct 20, 2017

@yingzhang1109 AFAIK, you can't reuse the lib in MinGW with VS... so you have to do it twice.

@ChrisTerBeke
Copy link

Indeed you'll need to compile Arcus and Protobuf with both MinGW and VS, store the bins/dlls separately and include the VS code version in Cura and the MinGW version when compiling CuraEngine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants