Part of code:
- Code: Select all
/* hello-ftdi.c: flash LED connected between CTS and GND.
This example uses the libftdi API.
Minimal error checking; written for brevity, not durability. */
#include <stdio.h>
#include <ftdi.h>
#define LED 0x08 /* CTS (brown wire on FTDI cable) */
int main()
{........
Command and its failure:
- Code: Select all
milan ~/CCPP $ gcc ftdi.c -o helloftdi
ftdi.c:6:18: fatal error: ftdi.h: File or directory does not exist
#include <ftdi.h>
^
compilation terminated.
And now little bit mismatch (for me)
- Code: Select all
milan ~/CCPP $ urpmq libftdi1
Package with name libftdi1 does not exists
milan ~/CCPP $ urpmq libftdi1_2
libftdi1_2
ftdi.h located in /usr/include/libftdi1
mga5 specfile:
- Code: Select all
%define api 1
%define major 2
%define libname %mklibname ftdi %{api} %{major}
1.Why must be there major2?
2.What is the solution for my program?
Thank You for answers, Milan