SoftEtherVPN / Win10Pcap

Win10Pcap: WinPcap for Windows 10 (NDIS 6.x driver model)
Other
337 stars 122 forks source link

Fail to link vs SDK static libs #25

Open v-instrumentix opened 3 years ago

v-instrumentix commented 3 years ago

When static lib coming with SDK is used for linking it fails with

C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/app.dir/objects.a(main.cpp.obj):main.cpp:(.text.startup+0x97c): undefined reference to `pcap_findalldevs'

Linking command:

/C/msys64/mingw64/bin/g++.exe -O3 -DNDEBUG -static-libgcc -static -Wl,--whole-archive CMakeFiles/app.dir/objects.a -Wl,--no-whole-archive -o app.exe -Wl,--major-image-version,0,--minor-image-version,0 /C/msys64/zoo/WpdPack/Lib/wpcap.lib -lws2_32 ...

Probably here is the explanation:

# nm /C/msys64/zoo/WpdPack/Lib/x64/wpcap.lib | grep -w pcap_findalldevs
0000000000000000 T pcap_findalldevs