0

I know how to fix typical LNK2019 errors in MSVS (2013) but I'm having some extra trouble when trying to use winpcap..

I installed winpcap from this site (a couple times, actually), which supposedly installed the necessary .dlls I need, and I also installed the developer kit and pointed the linker to it as so: (1), (2).

I placed WIN32 in my preprocessor directives (or rather, defines), which took away compilation errors. However, when I run the test code at the bottom of this post, I get these errors.

Test code here: http://pastie.org/10730081

galois
  • 825
  • 2
  • 11
  • 31

1 Answers1

1

Looking at your screenshot, you have added the paths to both the 64-bit and 32-bit library files. If the developers of the library were not careful to use different names for their 64-bit and 32-bit editions, then the linker won't be able to find the right functions.

It is searching first in the 64-bit folder (because that's the one you have listed first), but you are compiling the application targeting a 32-bit architecture (the "Win32" project configuration is active).

The fix is simple: make sure that you have matched up the "Library Directories" with your project configuration:

Win32 → C:\code\C++\libs\WpdPack\Lib\
x64 → C:\code\C++\libs\WpdPack\Lib\x64\

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574