Bonjour,

j'ai un problème avec l'edition des liens pour le makefile suivant:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Import the variables from EZSDK so that you can find the EZSDK components
include ${EZSDK}/Rules.make
 
 
# Creation of useful variables
CC=${CSTOOL_PREFIX}gcc
 
# Compilation options
CFLAGS=-I${EZSDK}/linux-devkit/arm-none-linux-gnueabi/usr/include
 
# Link edition options: add of libraries
TARGET=/home/banc_dt_078/targetfs
LDFLAGS=-lusb -L${TARGET}/usr/lib
 
# Name of executable file
EXEC=helloworld
 
# Name of c files to compile
#SRC=$(wildcard *.c)
SRC=helloworld.c usb.c
 
# Make a object file for all C files
OBJ=$(SRC:.c=.o)
 
all: $(EXEC)
 
# Creation of executable from all object files
helloworld: $(OBJ)
	$(CC) -o $@ $^ $(LDFLAGS)
 
# Modification (recompilation) of Object files if H files are modified
helloworld.o: standard.h
helloworld.o: main.h
usb.o: usb_driver.h
 
# Creation of all Object files from C files
%.o: %.c
	$(CC) -o $@ -c $< $(CFLAGS)
 
clean:
	rm *.o
 
mrproper: clean
	rm $(EXEC)
Je pense que le makefile est assez simple, cependant lors de l'édition des liens, j'ai un message étrange, comme si le compilateur était perdu:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
banc_dt_078@banc-dt-078:~/workspaces/helloWorld$ make -f Makefile helloworld
/home/banc_dt_078/Desktop/CodeSourceryLite//bin/arm-none-linux-gnueabi-gcc -o helloworld.o -c helloworld.c -I/home/banc_dt_078/ti-ezsdk_dm816x-evm_5_02_02_60/linux-devkit/arm-none-linux-gnueabi/usr/include
/home/banc_dt_078/Desktop/CodeSourceryLite//bin/arm-none-linux-gnueabi-gcc -o usb.o -c usb.c -I/home/banc_dt_078/ti-ezsdk_dm816x-evm_5_02_02_60/linux-devkit/arm-none-linux-gnueabi/usr/include
/home/banc_dt_078/Desktop/CodeSourceryLite//bin/arm-none-linux-gnueabi-gcc -o helloworld helloworld.o usb.o -lusb -L/home/banc_dt_078/targetfs/usr/lib
/home/banc_dt_078/Desktop/CodeSourceryLite/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lusb
collect2: ld returned 1 exit status
make: *** [helloworld] Error 1
Je ne sais pas pourquoi l'editeur de lien a l'air d'aller chercher sous ce chemin qui n'existe bien évidemment pas:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
/home/banc_dt_078/Desktop/CodeSourceryLite/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lusb
Quelqu'un a une idée de ce qui ne va pas ?