Page 1 of 1

compilation error when compiling hidtool.c

Posted: Tue Jun 22, 2010 7:57 pm
by appusajeev
hi...
I installed mingw, copied required libusb binaries into 'include' and 'lib' folder.
I tried compiling powerswitch.c and it compiled just fine...
but when i compile hidtool.c,like

gcc hidtool.c -lhid -lusb -lsetupapi

i get the error
[img=http://img252.imagevenue.com/loc435/th_28132_Capture_122_435lo.JPG]


Please please please someone help me....

Re: compilation error when compiling hidtool.c

Posted: Wed Jun 23, 2010 9:19 am
by frank26080115
a stab in the dark, but it looks like you are executing gcc from the mingw's bin directory, did you copy all of libusb's files to the bin directory? if not then that definitely won't work. You need to execute gcc where your project actually is so the header files included by the .c file can be found by the compiler.