libftdi Archives

Subject: Re: problem including and compiling with ftdi library

From: Sab V <madmanzigbee@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 27 Jul 2016 17:15:37 +0530
Check your linker flags once again . Try looking at some of these Makefiles to understand what libftdi needs to compile - http://developer.intra2net.com/git/?p=libftdi;a=tree;f=examples;h=d9e2ba38d9b2017d7b326b08b27b9a74e1133888;hb=HEAD.

You can add the -I flag to include directories to the path

On Wed, Jul 27, 2016 at 3:38 PM, Lorenzo Quadrelli <quadrelli.lorenzo@xxxxxxxxx> wrote:

Hello, I just installed the libraries following the provided instructions. I’m on Ubuntu operative system.

If I try to compile the example simple.c, inclunding <ftdi.h> I found this error.

gcc simple_ftdi.c -o myprogram

simple_ftdi.c:8:18: fatal error: ftdi.h: File o directory non esistente

 #include <ftdi.h>

                  ^

compilation terminated.

 

If I include <libftdi1/ftdi.h> instead of <ftdi.h> I obtain these errors.

gcc simple_ftdi.c -o my_program

/tmp/ccdtY2Pa.o: nella funzione "main":

simple_ftdi.c:(.text+0x18): riferimento non definito a "ftdi_new"

simple_ftdi.c:(.text+0x57): riferimento non definito a "ftdi_get_library_version"

simple_ftdi.c:(.text+0x96): riferimento non definito a "ftdi_usb_open"

simple_ftdi.c:(.text+0xab): riferimento non definito a "ftdi_get_error_string"

simple_ftdi.c:(.text+0xd6): riferimento non definito a "ftdi_free"

simple_ftdi.c:(.text+0xff): riferimento non definito a "ftdi_read_chipid"

simple_ftdi.c:(.text+0x130): riferimento non definito a "ftdi_usb_close"

simple_ftdi.c:(.text+0x145): riferimento non definito a "ftdi_get_error_string"

simple_ftdi.c:(.text+0x170): riferimento non definito a "ftdi_free"

simple_ftdi.c:(.text+0x183): riferimento non definito a "ftdi_free"

collect2: error: ld returned 1 exit status

 

I tried to solve including manually the file ftdi.c but it doesn’t work. What I can to compile a program? 

I appreciate all of your help
--
Lorenzo
SSSUP-LM EMBEDDED COMPUTING SYSTEMS


libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx





libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx


Current Thread