Problem solved.
$ g++ -std=c++11 dns-spoof.cpp -Wl,-rpath,/usr/local/lib /usr/local/lib/libtins.so
I found it out by fist linking successfully with CMake, and then by checking the linking options.
Know, regarding why I need to specify the library path instead of simply adding the -ltins option, I really don't know.
When I run g++ with -ltins option I get LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/../../../:/lib/:/usr/lib/
Anyway, thanks for helping.