I'm having issues linking to libtins and its dependencies using g++ (Mingw) 8.1.0
on Windows against the precompiled windows binaries.
What is wrong? I thought that I had linked against all of the required dependencies?
Error:
C:\Users\sneak\AppData\Local\Temp\ccqBjxkI.o: In function `callback(Tins::PDU const&)':
D:\Repos\Hacks\Sniffer/sniffer.cpp:18: undefined reference to `__imp__ZN4TinslsERSoRKNS_11IPv4AddressE'
D:\Repos\Hacks\Sniffer/sniffer.cpp:19: undefined reference to `__imp__ZN4TinslsERSoRKNS_11IPv4AddressE'
C:\Users\sneak\AppData\Local\Temp\ccqBjxkI.o: In function `main':
D:\Repos\Hacks\Sniffer/sniffer.cpp:25: undefined reference to `__imp__ZN4Tins7SnifferC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE'
C:\Users\sneak\AppData\Local\Temp\ccqBjxkI.o: In function `Tins::IP::src_addr() const':
D:\Repos\Hacks\Sniffer/Libs/libtins/include/tins/ip.h:392: undefined reference to `__imp__ZN4Tins11IPv4AddressC1Ej'
C:\Users\sneak\AppData\Local\Temp\ccqBjxkI.o: In function `Tins::IP::dst_addr() const':
D:\Repos\Hacks\Sniffer/Libs/libtins/include/tins/ip.h:400: undefined reference to `__imp__ZN4Tins11IPv4AddressC1Ej'
C:\Users\sneak\AppData\Local\Temp\ccqBjxkI.o: In function `Tins::SnifferIterator::advance()':
D:\Repos\Hacks\Sniffer/Libs/libtins/include/tins/sniffer.h:515: undefined reference to `__imp__ZN4Tins11BaseSniffer11next_packetEv'
C:\Users\sneak\AppData\Local\Temp\ccqBjxkI.o: In function `void Tins::BaseSniffer::sniff_loop<bool (*)(Tins::PDU const&)>(bool (*)(Tins::PDU const&), unsigned int)':
D:\Repos\Hacks\Sniffer/Libs/libtins/include/tins/sniffer.h:673: undefined reference to `__imp__ZN4Tins11BaseSniffer5beginEv'
D:\Repos\Hacks\Sniffer/Libs/libtins/include/tins/sniffer.h:673: undefined reference to `__imp__ZN4Tins11BaseSniffer3endEv'
C:\Users\sneak\AppData\Local\Temp\ccqBjxkI.o: In function `Tins::Sniffer::~Sniffer()':
D:\Repos\Hacks\Sniffer/Libs/libtins/include/tins/sniffer.h:324: undefined reference to `__imp__ZTVN4Tins7SnifferE'
D:\Repos\Hacks\Sniffer/Libs/libtins/include/tins/sniffer.h:324: undefined reference to `__imp__ZN4Tins11BaseSnifferD2Ev'
collect2.exe: error: ld returned 1 exit status
Hi,
I'm having issues linking to libtins and its dependencies using g++ (Mingw) 8.1.0 on Windows against the precompiled windows binaries. What is wrong? I thought that I had linked against all of the required dependencies?
Error:
Build command:
Directory Tree:
Basic code sample:
Thanks