I was trying to compile libmodbuspp on MacOS (since I could not find it as a package for homebrew).
I got the below error messages:
[ 7%] Building CXX object lib/CMakeFiles/objlib.dir/__/src/request.cpp.o
warning: unknown warning option '-Wno-psabi' [-Wunknown-warning-option]
In file included from /Users/kraft/Code/libmodbuspp/src/request.cpp:17:
/Users/kraft/Code/libmodbuspp/include/modbuspp/device.h:105:80: error: implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >'
explicit Device (const std::string & jsonfile, const std::string & key = std::string());
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:209:32: note: template is declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
In file included from /Users/kraft/Code/libmodbuspp/src/request.cpp:17:
/Users/kraft/Code/libmodbuspp/include/modbuspp/device.h:189:79: error: implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >'
bool setConfig (const std::string & jsonfile, const std::string & key = std::string());
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:209:32: note: template is declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
In file included from /Users/kraft/Code/libmodbuspp/src/request.cpp:19:
In file included from /Users/kraft/Code/libmodbuspp/include/modbuspp/request.h:19:
In file included from /Users/kraft/Code/libmodbuspp/include/modbuspp/message.h:24:
/Users/kraft/Code/libmodbuspp/include/modbuspp/data.h:283:17: warning: enumeration values 'Uint16' and 'Int16' not handled in switch [-Wswitch]
switch (m_value) {
^
/Users/kraft/Code/libmodbuspp/include/modbuspp/data.h:283:17: note: add missing switch cases
switch (m_value) {
^
2 warnings and 2 errors generated.
Full cmake logfile and full build output attached.
cmake .. &> cmake.log
make -k &> full-build.txt
Hi,
I was trying to compile libmodbuspp on MacOS (since I could not find it as a package for homebrew).
I got the below error messages:
Full cmake logfile and full build output attached. cmake .. &> cmake.log make -k &> full-build.txt
cmake.log full-build.txt