What could be wrong here? I have the following simple class:
#include \"libmnl/libmnl.h\" int main() { struct mnl_socket *a = mnl_socket_open(12); } <
Libraries must be listed after the objects that use them (more precisely, a library will be used only if it contains a symbol that satisfies an undefined reference known at the time it is encountered). Move the -lmnl to the end of the command.
-lmnl