Hello all,
I built the SNMP++ library in a home directory as described in the README with the following commands:
autoreconf -i
./configure
make
Then added the following command:
sudo make install
To test the library I wrote the following minimal application up to the point of:
#include <libsnmp.h>
#include “/home/user/path/to/snmp+±3.4.10/include/snmp_pp/snmp_pp.h”int main(int argc, char **argv) {
Snmp_pp::Snmp::socket_startup();
Snmp_pp::Snmp::socket_cleanup();
return 0;
}
(Please excuse the incorrect indentation. Unfortunately I don’t know how to do this correctly in Markdown. )
To build I try this as follows:
g++ myTest.cpp -o test
Unfortunately I get the following errors among others
myTest.cpp: In function ‘int main(int, char**)’:
myTest.cpp:7:3: error: ‘Snmp_pp’ has not been declared
Snmp_pp::Snmp::socket_startup();
^~~~~~~
myTest.cpp:8:3: error: ‘Snmp_pp’ has not been declared
Snmp_pp::Snmp::socket_cleanup();
^~~~~~~
My guess is, that I still need to tell the linker where to find the library. Unfortunately I don’t know the command for this.
I have also already tried it with -libsnmp. Unfortunately without success.
Thanks in advance and kind regards
schande