What do you do when the Java VM has a “symbol lookup error” when executing a JNI function? The symbol lookup error is not in the primary shared object library that support
I had similar problem, and later I found it was the problem of linking order:
you need to put -L/usr/local/lib -lnetsnmp after the -o libmytest.so for it to work.
-L/usr/local/lib -lnetsnmp
-o libmytest.so