Page 1 of 1

Can't compile hidtool from examples

Posted: Tue Sep 29, 2009 12:20 pm
by Urvin
Hi!
I can't compile hidtool host application from example of hid-data usage (examples\hid-data\commandline).
That's what mingw says:
Image

windows 7
mingw 3.81
v-usb 20090822

Re: Can't compile hidtool from examples

Posted: Tue Sep 29, 2009 6:04 pm
by Urvin
Plus if I try to rewrite the whole code in Code::Blocks, compiler returns "undefined reference to `usbhidOpenDevice(usbDevice**, int, char*, int, char*, int)'" :(

Re: Can't compile hidtool from examples

Posted: Wed Sep 30, 2009 9:23 am
by K-Duke
Well if you could provide the commandline used to invoke compiling?
Maybe you just forgot to specify the right make file?
The right command line would be

Code: Select all

make -f Makefile.windows

Re: Can't compile hidtool from examples

Posted: Wed Sep 30, 2009 9:33 am
by Urvin
ya, I print "make -f Makefile.windows".
Also it doesn't compile if I edit makefile and run "make".

I found another way to compile the example using Code::Blocks IDE.
The solution is to add hiddata.h this way:

Code: Select all

extern "C"
{
    #include "hiddata.h"
}

Re: Can't compile hidtool from examples

Posted: Sun Oct 04, 2009 11:58 am
by christian
Your development environment seems to lack some of the USB driver libs. Did you try MinGW?

Re: Can't compile hidtool from examples

Posted: Sun Oct 04, 2009 5:47 pm
by Urvin
I use MinGW ;)
Trere's no other compilers on my computer

Re: Can't compile hidtool from examples

Posted: Sun Oct 04, 2009 5:53 pm
by christian
I've looked at the error message again. This is an internal error of your gcc. The compiler frontend can't create a process for the preprocessor or another stage of the compiler chain. Your gcc installation seems to be broken.

Re: Can't compile hidtool from examples

Posted: Sun Oct 04, 2009 5:58 pm
by Urvin
I use MinGW that goes with Qt package.
Code::Blocks use the same MinGW.

Using codeclocks i can compile the example (I also tested it with MCU with hid-data example firmware), using Makefile.windows and (edited) Makefile - can't.

Re: Can't compile hidtool from examples

Posted: Sun Oct 04, 2009 9:00 pm
by christian
Then it's probably an issue with search paths (the environment variable PATH).

Re: Can't compile hidtool from examples

Posted: Mon Oct 05, 2009 9:45 am
by Urvin
MinGWs dir name is added to PATH variable

Re: Can't compile hidtool from examples

Posted: Mon Oct 05, 2009 10:37 am
by christian
You probably need MinGW's bin directory in PATH, not the MinGW directory itself.

Re: Can't compile hidtool from examples

Posted: Mon Oct 05, 2009 11:21 am
by Urvin
bin path certainly.
"C:\Qt\2009.03\mingw\bin;"

Re: Can't compile hidtool from examples

Posted: Mon Oct 05, 2009 11:51 am
by christian
OK. But it's still a kind of internal error: CreateProcess for gcc fails.

Re: Can't compile hidtool from examples

Posted: Wed Mar 28, 2012 8:03 am
by kot3245
I rewrote the host side to fasm. You can find it at http://www.kot3245.ru
In addition, you can compile host side software under linux.