Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fail to link vs SDK static libs #25

Open
v-instrumentix opened this issue Nov 4, 2020 · 0 comments
Open

Fail to link vs SDK static libs #25

v-instrumentix opened this issue Nov 4, 2020 · 0 comments

Comments

@v-instrumentix
Copy link

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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant