Hi,
first i wanted to thank the developers for this great software!
I tried building the hid-data example. Everything concerning the firmware worked fine, but compiling the commandline application on an OS X 10.6 didn't work. I installed libusb 1.0.8 and couldn't find the libusb-config file. This file also was not created when installing libusb 1.0.6 or libusb-devel via macports. After several days of research i couldn't figure out what to do in order to get the files compiled.
When calling "make", i always get:
gcc `libusb-config --cflags` -O -g -Wall -c opendevice.c
/bin/sh: libusb-config: command not found
In file included from opendevice.c:18:
opendevice.h:26:77: error: usb.h: No such file or directory
In file included from opendevice.c:18:
opendevice.h:29: error: expected ‘)’ before ‘*’ token
opendevice.h:40: error: expected ‘)’ before ‘*’ token
opendevice.c:86: error: expected ‘)’ before ‘*’ token
opendevice.c:116: error: expected ‘)’ before ‘*’ token
make: *** [opendevice.o] Error 1
I even tried to find the necessary files that have to be included by hand and to include them, which didn't work out either. Was anyone able to build the commandline examples on an os x? And if, what could i do to overcome those problems?
Thanks a lot in advance, best regards,
Roman
Problem building commandline examples on OS X
-
- Posts: 5
- Joined: Fri May 13, 2011 12:31 am
Re: Problem building commandline examples on OS X
Hi there.
Probably the easiest and fastest way to get a working AVR development environment on the Mac is to just download the Arduino IDE and add the following to your .bashrc
this will get you avr-gcc, avrdude, etc.
Probably the easiest and fastest way to get a working AVR development environment on the Mac is to just download the Arduino IDE and add the following to your .bashrc
Code: Select all
if [ -d /Applications/Arduino.app ]; then
export PATH="$PATH:/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin"
fi
this will get you avr-gcc, avrdude, etc.
Re: Problem building commandline examples on OS X
@jamesotron: And his question had nothing to do with avr-gcc.
Roman,
Most likely MacOS libusb does not ship with "libusb-config" tool. You'll need to edit the Makefile so gcc can find the usb.h file and libusb.so file. Instead of "`libusb-config --cflags`" you'll need to add something like "-I/usr/include/libusb/" (I don't own MacOS so I don't know the paths)
Roman,
Most likely MacOS libusb does not ship with "libusb-config" tool. You'll need to edit the Makefile so gcc can find the usb.h file and libusb.so file. Instead of "`libusb-config --cflags`" you'll need to add something like "-I/usr/include/libusb/" (I don't own MacOS so I don't know the paths)
-
- Posts: 1
- Joined: Fri May 20, 2011 10:02 pm
Re: Problem building commandline examples on OS X
Roman, any success in building a host application? Does it require xCode?
What bothers me most of all is the question if I need to install any other files but for the host app for it to run on the destination (not developer's) machine?
What bothers me most of all is the question if I need to install any other files but for the host app for it to run on the destination (not developer's) machine?