It seems like you're trying to compile the simple WFP project from codeproject. The guys above probably didn't understand the questions but the answer was:
- find the first function linker fails at and find it on MSDN, eg. FwpmEngineOpen0 and find which library it needs to link to and add it to the project properties / Linker / Input / Additional Dependencies
- Actually in the sample, there was another function failing to link UuidCreate
Long story short:
- Create a plain Win32 console application (I did it with VS2012) and build it - make sure it works
- Add the header file to the project (PacketFilter.h) to the project
- Replace the main source file with (PacketFilter.cpp) contents, but don't delete the include for "stdafx.h" on the top of the file
- Add the following libraries into the linker section (as per above)
Fwpuclnt.lib Rpcrt4.lib
Build and run the application (you might need to change the character set to multi-byte too).
You'll have to modify the IP address in the source to make the sample work. I picked a local IP address and did
ping -n 100 192.168.100.200
See the ping returning, start the exe, and see ping failing to reach destination (timing out) - eg. firewall is working. Then press any key to stop firewall and see ping reaching destination again.
I would've posted the link to the codeproject page, but as I have less than 10 credit - I can't :-P
Google for: "Firewall using Vista's Windows Filtering Platform APIs"
Hope this helps anyone who tries to build this sample.