我已经使用 sudo make 和 sudo make install 在 raspberry 上成功安装了 Open-zwave。在此之后,我想编译这个包中的示例(cpp/example 并做了“make”),但在此之后他向我展示了许多他没有找到的函数。这是错误:
usr/bin/ld: /home/pi/projet_intern/open-zwave/cpp/examples/MinOZW/.lib/Main.o: 在函数
OnNotification(OpenZWave::Notification const*, void*)': Main.cpp:(.text+0x468): undefined reference to
OpenZWave::Manager::HasExtendedTxStatus(unsigned int)' /usr/bin/ld : Main.cpp:(.text+0x48c): undefined reference toOpenZWave::Manager::s_instance' /usr/bin/ld: /home/pi/projet_intern/open-zwave/cpp/examples/MinOZW/.lib/Main.o: in function
main': Main.cpp:(.text.startup+0x44): undefined reference toOpenZWave::Manager::getVersionLongAsString[abi:cxx11]()' /usr/bin/ld: Main.cpp:(.text.startup+0x9c): undefined reference to
OpenZWave::Options::Create(std::__cxx11::basic_string< char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits , std::allocator > const&)' /usr/bin/ld: Main.cpp:(.text.startup+0xd8): 未定义对OpenZWave::Options::Get()' /usr/bin/ld: Main.cpp:(.text.startup+0xf8): undefined reference to
OpenZWave::Options::AddOptionInt(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' /usr/bin/ld: Main.cpp:(.text.startup+0x10c): 未定义的引用OpenZWave::Options::Get()' /usr/bin/ld: Main.cpp:(.text.startup+0x12c): undefined reference to
OpenZWave::Options::AddOptionInt(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' /usr/bin/ld: Main.cpp:(.text.startup+ 0x140): 对OpenZWave::Options::Get()' /usr/bin/ld: Main.cpp:(.text.startup+0x160): undefined reference to
OpenZWave::Options::AddOptionInt(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' /usr/bin/ld: Main.cpp 的未定义引用(.text.startup+0x174): 未定义对OpenZWave::Options::Get()' /usr/bin/ld: Main.cpp:(.text.startup+0x194): undefined reference to
OpenZWave::Options::AddOptionInt(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' /usr/bin/ 的引用ld: Main.cpp:(.text.startup+0x1a8): 未定义对OpenZWave::Options::Get()' /usr/bin/ld: Main.cpp:(.text.startup+0x1c8): undefined reference to
OpenZWave::Options::AddOptionBool(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)的引用' /usr/bin/ld: Main.cpp:(.text.startup+0x1dc): 未定义的引用OpenZWave::Options::Get()' /usr/bin/ld: Main.cpp:(.text.startup+0x1fc): undefined reference to
OpenZWave::Options::AddOptionBool(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)' /usr/bin/ld: Main.cpp:(.text.startup+ 0x214): 未定义对OpenZWave::Options::Get()' /usr/bin/ld: Main.cpp:(.text.startup+0x218): undefined reference to
OpenZWave::Options::Lock()' 的引用 /usr/bin/ld: Main.cpp:(.text.startup+0x21c): 未定义对OpenZWave::Manager::Create()' /usr/bin/ld: Main.cpp:(.text.startup+0x22c): undefined reference to
OpenZWave::Manager::AddWatcher(void ( )的引用(OpenZWave::Notification const , void*), void*)' /usr/bin/ld: Main.cpp:(.text.startup+0x27c): 未定义对OpenZWave::Manager::AddDriver(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, OpenZWave::Driver::ControllerInterface const&)' /usr/bin/ld: Main.cpp:(.text.startup+0x2d8): undefined reference to
OpenZWave::Manager::RemoveDriver(std::__cxx11 ) 的引用::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: Main.cpp:(.text.startup+0x2f8): 未定义对OpenZWave::Manager::RemoveWatcher(void (*)(OpenZWave::Notification const*, void*), void*)' /usr/bin/ld: Main.cpp:(.text.startup+0x2fc): undefined reference to
OpenZWave::Manager::Destroy( )' /usr/bin/ld: Main.cpp:(.text.startup+0x300): 未定义的引用OpenZWave::Options::Destroy()' /usr/bin/ld: Main.cpp:(.text.startup+0x3cc): undefined reference to
OpenZWave::Manager::RemoveDriver(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: Main.cpp:(.text.startup+0x3e8) : 对OpenZWave::Manager::AddDriver(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, OpenZWave::Driver::ControllerInterface const&)' /usr/bin/ld: Main.cpp:(.text.startup+0x448): undefined reference to
OpenZWave::Manager::GetNodeName[abi:cxx11](unsigned int, unsigned char)' /usr/bin/ld: Main.cpp:(.text.startup+0x478) 的未定义引用:对OpenZWave::Manager::GetNodeManufacturerName[abi:cxx11](unsigned int, unsigned char)' /usr/bin/ld: Main.cpp:(.text.startup+0x4a8): undefined reference to
OpenZWave::的未定义引用Manager::GetNodeProductName[abi:cxx11](unsigned int, unsigned char)' /usr/bin/ld: Main.cpp:(.text.startup+0x514): undefined reference toOpenZWave::Manager::GetValueLabel[abi:cxx11](OpenZWave::ValueID const&, int)' /usr/bin/ld: Main.cpp:(.text.startup+0x53c): undefined reference to
OpenZWave::ValueID::GetTypeAsStringabi:cxx11 const ' /usr/bin/ld: Main.cpp:(.text.startup+0x574): 未定义对OpenZWave::Manager::GetValueHelp[abi:cxx11](OpenZWave::ValueID const&, int)' /usr/bin/ld: Main.cpp:(.text.startup+0x5a0): undefined reference to
OpenZWave::Manager::GetValueUnits[abi:cxx11](OpenZWave::ValueID const&) 的引用' /usr/bin/ld : Main.cpp:(.text.startup+0x5c8): 未定义的引用OpenZWave::Manager::GetValueMin(OpenZWave::ValueID const&)' /usr/bin/ld: Main.cpp:(.text.startup+0x5e0): undefined reference to
OpenZWave::Manager::GetValueMax(OpenZWave::ValueID const&)' /usr/bin/ld: Main.cpp:(.text.startup+0x5f8): 未定义对OpenZWave::ValueID::GetGenreAsString[abi:cxx11]() const' /usr/bin/ld: Main.cpp:(.text.startup+0x668): undefined reference to
OpenZWave::Manager::GetDriverStatistics(unsigned int, OpenZWave ) 的引用::Driver::DriverData*)' /usr/bin/ld: Main.cpp:(.text.startup+0x7b8): undefined reference to `OpenZWave::Manager::s_instance' collect2: error: ld returned 1 exit status make: *** [Makefile:70: /home/pi/projet_intern/open-zwave/cpp/examples/MinOZW/.lib/MinOZW] 错误 1