Skip to content

issue compiling on Linux #16

@chriscamacho

Description

@chriscamacho

While adjusting some paths in the makefile is almost expected! I did have to modify the source to get it to compile at around line 824 of ujprog.c

    //#ifdef __linux__
    //    usb_reset((void *) fc.usb_dev);
    //#else
         res = ftdi_usb_close(&fc);

in the makefile I had to comment out the arch define (the libs being in /usr/lib)
I had to add include directories

     -I/usr/include/libftdi1 -I/usr/include/libusb-1.0

additionally I had to change the order of libs and add a few

    FTLIB = /usr/lib/${ARCHNAME}/libftdi1.a
    USBLIB = /usr/lib/${ARCHNAME}/libusb-1.0.a
    
    ujprog:	${SRCS}
    	${CC} ${CFLAGS} ${SRCS} -o ujprog ${FTLIB} ${USBLIB} -lpthread -ludev 

while specific lib name and path oddities are distro specific, maybe the source modification needs review ?

Hope this helps

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions