I have been trying to compile a recent copy of cgminer with minGW. After finding the right packages for the first half of setting it up for the make I got errors saying that at some point it thinks this program is using winsock 1 when the headers it specify as using say winsock2.h. is there a good way to find out where it thinks I'm using the older file and make sure it's compiling with the file I think it's supposed to use ?

I really don't want to rewrite this program I want to run since I think it's been compiled many time using Linux so I'd hope the instructions cgminer gave for windows are still somewhat accurate and should be compile-able(even though I still had to search for some non specified version packages).