I tried to compile with a MinGW different versions of cgminer ( bitmain,kano,original),
all give an error in usbutils.c when compiling with --enable-bmsc --enable-bitmain --enable-icarus (--enable-icarus it is necessary to detect the usb device).
OK this is quite easy to resolve, though after compiling and running, only one board is detected and it still throws errors. Here's what you need to do to get rid of the errors in usbutils.
1. The first set of errors refers to previously defined structures (13 in total), i.e there are ifdef conditions that overlap for ICARUS and BMSC. I opened the file
usbutils.c and commented out the initial conflicting declarations inside
#ifdef USE_ICARUS (it does not matter whether you do the other!). Not all declarations inside here need to be commented out, declarations 3, 4 and 5 are not duplicated.
2. The next error thrown was a conflict of declaration of the function
rev. After removing the static marker on the function inside driver-icarus.c, the compiler threw another error relating to the same function as having been included from another header file. So I un-commented the function out completely from the
driver-icarus.c file and re-compiled.
After making the above changes, recompilation was successfull and the executable runs, albeit with the error mentioned above.