Hi,
The demos build using cmake. This should automatically link the correct libraries. It doesn't link the ones in /usr/lib, it directly links the ones created in the build.
If you creating your own application outside of the opendnp3 build system, you must manually specify the libraries to link. You can see this reflected in the build script for the pifacertu exe:
https://github.com/automatak/pifacertu/blob/master/CMakeLists.txt#L17The part that says "asiodnp3 opendnp3 asiopal openpal" is the 4 libraries that need to be linked for basic dnp3 support.
This causes cmake to put "-lasiodnp3 -lopendnp3 -lasiopal -lopenpal" on the command line for GCC.
If you're still having trouble, please post the linking error you get. Part of the problem may be that opendnp3 has optional components (TLS and secure authentication), and if you built the
libraries with support for these, you have to link additional libraries. I could see this causing confusion, and I've made a note to add a section on linking to the guide.
-Adam