[En-Nut-Discussion] Order of libs in makefile

Tom Nyström m99tomny at embassaden.liu.se
Tue Apr 15 14:46:29 CEST 2003


Hello again!
 
When trying to make an example to illustrate the problem with
Port E Pin 5 and Ethernet we found that the order of the libs
in the makefile is crucial. The two lines below illustrate what
we found. With the top one the code compiles normally. The bottom
one contains the same libs but in a different order and does not
compile.
 
works:
LIBS =  $(LIBDIR)/nutinit.o -lnutnet -lnutpro -lnutos -lnutdev -lnutcrt
does not work:
LIBS =  $(LIBDIR)/nutinit.o -lnutos -lnutdev -lnutcrt -lnutnet -lnutpro
 
The code has the following includes:
#include <stdio.h>
#include <io.h>
#include <dev/nicrtl.h>
#include <dev/uartavr.h>
#include <sys/timer.h>
 
Is this a deliberate feature? How can one know in which order to
put the libs?
 
Best regards
Tom Nyström



More information about the En-Nut-Discussion mailing list