WinPcap with Dev C++

Hey so I have been trying to get the WinPcap libraries to work with Dev C++ for the last couple days and have had no luck. It seems everyone else is having the same problems as I checked the internet and all I seem to find is reports of this problems but no solutions. So I will try to make this as understandable as possible. I installed the appropriate drivers for the libraries. I have saved the contents of the WinPcap libraries into Dev C++'s lib folder. I saved the required includes (.h files) into the the include folder in the Dev C++ directory. I then made some changes to one of the C examples provided, and created a new C++ project. I linked to wpcap.lib and libws2_32.a and then compiled it. Here is the code and error I got.

For some reason it isn't registering that certain functions are in the library. I also linked to libwpcap.a just to be sure but nothing changed. Also I know there are other errors in the code I.E. me not defining any standard libraries but this is just to illustrate a point and get the problem fixed im actually just using these select functions in a much bigger project and just posted this as a quick demo. Any thoughts?

Don't copy any library files to include/lib directories, instead, add search directories.
Dev C++ is no longer supported, and the MinGW version that is shipped with this IDE is old and outdated. The best choice for MinGW is CodeBlocks IMO.

I had a look at my old WinPcap project, and noticed that there is a #define preceding the inclusion of <pcap.h>:

Yes I appoligze for the poor example I quickly ported something from C and did a terrible job. Anyways thank you for providing that information, would it save me a lot of time and effort if I just used visual studios 2010 C++ compiler instead? I am a student and have a pfree MSDN license are the libraries supported by Visual C++?

Hey so I finally got around to downloading Visual Studios 2010 just a couple questions on using it with the WinPcap libraries. What are the default directories in which I need to place the WinPcap .lib and .h files and what exactly do I need to add as additional dependencies?