Can't compile hidtool from examples

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
Urvin
Posts: 16
Joined: Wed Sep 16, 2009 3:26 pm

Can't compile hidtool from examples

Post by Urvin » Tue Sep 29, 2009 12:20 pm

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

Urvin
Posts: 16
Joined: Wed Sep 16, 2009 3:26 pm

Re: Can't compile hidtool from examples

Post by Urvin » Tue Sep 29, 2009 6:04 pm

Plus if I try to rewrite the whole code in Code::Blocks, compiler returns "undefined reference to `usbhidOpenDevice(usbDevice**, int, char*, int, char*, int)'" :(

K-Duke
Posts: 7
Joined: Wed Sep 23, 2009 9:28 pm

Re: Can't compile hidtool from examples

Post by K-Duke » Wed Sep 30, 2009 9:23 am

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

Urvin
Posts: 16
Joined: Wed Sep 16, 2009 3:26 pm

Re: Can't compile hidtool from examples

Post by Urvin » Wed Sep 30, 2009 9:33 am

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"
}

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Re: Can't compile hidtool from examples

Post by christian » Sun Oct 04, 2009 11:58 am

Your development environment seems to lack some of the USB driver libs. Did you try MinGW?

Urvin
Posts: 16
Joined: Wed Sep 16, 2009 3:26 pm

Re: Can't compile hidtool from examples

Post by Urvin » Sun Oct 04, 2009 5:47 pm

I use MinGW ;)
Trere's no other compilers on my computer

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Re: Can't compile hidtool from examples

Post by christian » Sun Oct 04, 2009 5:53 pm

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.

Urvin
Posts: 16
Joined: Wed Sep 16, 2009 3:26 pm

Re: Can't compile hidtool from examples

Post by Urvin » Sun Oct 04, 2009 5:58 pm

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.

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Re: Can't compile hidtool from examples

Post by christian » Sun Oct 04, 2009 9:00 pm

Then it's probably an issue with search paths (the environment variable PATH).

Urvin
Posts: 16
Joined: Wed Sep 16, 2009 3:26 pm

Re: Can't compile hidtool from examples

Post by Urvin » Mon Oct 05, 2009 9:45 am

MinGWs dir name is added to PATH variable

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Re: Can't compile hidtool from examples

Post by christian » Mon Oct 05, 2009 10:37 am

You probably need MinGW's bin directory in PATH, not the MinGW directory itself.

Urvin
Posts: 16
Joined: Wed Sep 16, 2009 3:26 pm

Re: Can't compile hidtool from examples

Post by Urvin » Mon Oct 05, 2009 11:21 am

bin path certainly.
"C:\Qt\2009.03\mingw\bin;"

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Re: Can't compile hidtool from examples

Post by christian » Mon Oct 05, 2009 11:51 am

OK. But it's still a kind of internal error: CreateProcess for gcc fails.

kot3245

Re: Can't compile hidtool from examples

Post by kot3245 » Wed Mar 28, 2012 8:03 am

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.

Post Reply