#1 fails to compile

v1.0 (example)
closed
nobody
5
2004-11-04
2003-02-27
Paul Davis
No

I am having trouble compileing the source.

$ make
cc -c -o ifp.o ifp.c
ifp.c:2:17: usb.h: No such file or directory
In file included from ifp.c:4:
ifp_routines.h:4:17: usb.h: No such file or directory
make: *** [ifp.o] Error 1

so I follow up with:
find / -name usb.h

and get:
/usr/include/linux/usb.h
/usr/src/linux-2.4.18-6mdk/drivers/usb/storage/usb.h
/usr/src/linux-2.4.18-6mdk/include/linux/usb.h
/usr/src/linux-2.4.18-8.1mdk/drivers/usb/storage/usb.h
/usr/src/linux-2.4.18-8.1mdk/include/linux/usb.h

then:
cp /usr/include/linux/usb.h ./

edit ifp.c and ifp_routines.c to use
#include "usb.h"

and try to make again to get:
$ make
cc -c -o ifp.o ifp.c
In file included from ifp.c:4:
ifp_routines.h:10: parse error before `*'
ifp_routines.h:11: parse error before `*'
ifp_routines.h:12: parse error before `*'
ifp_routines.h:13: parse error before `*'
ifp_routines.h:14: parse error before `*'
ifp_routines.h:15: parse error before `*'
ifp_routines.h:16: parse error before `*'
ifp_routines.h:17: parse error before `*'
ifp_routines.h:18: parse error before `*'
ifp_routines.h:20: parse error before `*'
ifp_routines.h:21: parse error before `*'
ifp_routines.h:22: parse error before `*'
ifp_routines.h:23: parse error before `*'
ifp.c:23: parse error before `*'
ifp.c: In function `info':
ifp.c:26: `head' undeclared (first use in this function)
ifp.c:26: (Each undeclared identifier is reported only once
ifp.c:26: for each function it appears in.)
ifp.c:27: `f' undeclared (first use in this function)
ifp.c:32: `dh' undeclared (first use in this function)
ifp.c: In function `main':
ifp.c:46: `usb_dev_handle' undeclared (first use in
this function)
ifp.c:46: `dh' undeclared (first use in this function)
ifp.c:47: parse error before `int'
ifp.c:56: `is_mc' undeclared (first use in this function)
ifp.c:61: `myargv' undeclared (first use in this function)
ifp.c:62: `i' undeclared (first use in this function)
ifp.c:81: `usb_busses' undeclared (first use in this
function)
ifp.c:81: dereferencing pointer to incomplete type
ifp.c:82: dereferencing pointer to incomplete type
ifp.c:82: dereferencing pointer to incomplete type
ifp.c:83: dereferencing pointer to incomplete type
ifp.c:83: dereferencing pointer to incomplete type
ifp.c:117: `f' undeclared (first use in this function)
ifp.c:141: `fname' undeclared (first use in this function)
ifp.c:172: case label not within a switch statement
ifp.c:174: break statement not within loop or switch
ifp.c:175: case label not within a switch statement
ifp.c:178: break statement not within loop or switch
ifp.c:191: `buf' undeclared (first use in this function)
make: *** [ifp.o] Error 1

Sorry, but, what am I missing?

Discussion

  • Logged In: YES
    user_id=502570

    I'm getting the exact same error. I am using Mandrake 9.1.
    I checked and libusb is installed, but I downloaded and
    installed the new version from sourceforge anyway. When it
    complained it was missing usb.h, I tried copying the files
    from the libusb dir to the ifp-line-0.1.1 directory. Still
    can't find the file.

    Help!

     
  • Yamashiro, Jun
    Yamashiro, Jun
    2003-06-11

    Logged In: YES
    user_id=762195

    > Sorry, but, what am I missing?

    Change Makefile's CFLAGS and LDFLAGS or use CVS version.

    Old:
    LDLIBS=-lusb
    CFFLAGS=-Wall
    New:
    CFLAGS=`libusb-config --cflags` -Wall -g
    LDFLAGS=`libusb-config --libs`

     
  • Yamashiro, Jun
    Yamashiro, Jun
    2003-07-26

    Logged In: YES
    user_id=762195

    > Change Makefile's CFLAGS and LDFLAGS or use CVS version.

    Fixed Makefile in ifp-line-0.2.0 .
    Please download and build it.

     
  • Geoff Oakham
    Geoff Oakham
    2004-11-04

    • status: open --> closed