OpenZWave / open-zwave

a C++ library to control Z-Wave Networks via a USB Z-Wave Controller.
http://www.openzwave.net/
GNU Lesser General Public License v3.0
1.05k stars 918 forks source link

error while compiling the example of openzwave #2606

Open abir-wind opened 3 years ago

abir-wind commented 3 years ago

had succesfully installed Open-zwave on raspberry with sudo make and sudo make install. After this I wanted to compile the example in this package(cpp/example and did "make"), but after this he show me many functions which he not found. This are the errors:

usr/bin/ld: /home/pi/projet_intern/open-zwave/cpp/examples/MinOZW/.lib/Main.o: in function 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 to OpenZWave::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 to OpenZWave::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): undefined reference to 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): undefined reference to 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): undefined reference to 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): undefined reference to 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): undefined reference to 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): undefined reference to 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): undefined reference to 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): undefined reference to 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): undefined reference to OpenZWave::Manager::AddDriver(std::cxx11::basic_string<char, std::char_traits, std::allocator > 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): undefined reference to 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): undefined reference to 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): undefined reference to OpenZWave::Manager::AddDriver(std::__cxx11::basic_string<char, std::char_traits, std::allocator > 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): undefined reference to 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 to OpenZWave::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): undefined reference to 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): undefined reference to 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): undefined reference to 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] Error 1