yashi79
11-01-2010, 00:38
sto cross-compilando per ARM l'implementazione del protocollo AODV della Uppsala University, ma ottengo una serie di errori del tipo:
main.o: In function `cleanup':
main.c:(.text+0x1b0): undefined reference to `rt_table_destroy'
la funzione rt_table_destroy è inclusa nel file routing_table.c a sua volta dichiarato nelle intestazioni del main.c:
[code]#include "routing_table.h[\CODE]
siccome sono abbastanza niubba in programmazione, mi sapreste dire come risolvere? in un post simile ho letto che bisogna effettuare un linking, ma siccome il comando che dò per la cross compilazione è om-conf, non so come risolvere!
OK facendo un attimino funzionare la testa, ho modificato un makefile.am (aggiungendo semplicemente un "\" e andando a capo per elencare tutti i sorgenti) ed ho risolto questo problema.
purtroppo ne è sorto un altro:
[CODE] In file included from llf.c:23:
debug.h:56:25: warning: ISO C does not permit named variadic macros
In file included from /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include/linux/rtnetlink.h:5,
from llf.c:34:
/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include/linux/if_link.h:43: error: expected specifier-qualifier-list before ‘__u64’
In file included from /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include/linux/rtnetlink.h:7,
from llf.c:34:
/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include/linux/neighbour.h:92: error: expected specifier-qualifier-list before ‘__u64’
llf.c:36:19: error: iwlib.h: Nessun file o directory
llf.c: In function ‘llf_rtnl_open’:
llf.c:106: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness
llf.c: In function ‘index2name’:
llf.c:150: error: storage size of ‘irq’ isn’t known
llf.c:150: warning: unused variable ‘irq’
llf.c: In function ‘iw_get_interface_data’:
llf.c:186: warning: implicit declaration of function ‘iw_sockets_open’
llf.c:206: warning: implicit declaration of function ‘iw_get_range_info’
llf.c:210: warning: implicit declaration of function ‘iw_sockets_close’
llf.c: In function ‘mac_to_ip’:
llf.c:242: warning: format ‘%x’ expects type ‘unsigned int *’, but argument 4 has type ‘int *’
llf.c:242: warning: format ‘%x’ expects type ‘unsigned int *’, but argument 5 has type ‘int *’
llf.c:246: warning: implicit declaration of function ‘iw_ether_aton’
llf.c: In function ‘llf_print_event’:
llf.c:264: warning: unused variable ‘buffer’
llf.c: In function ‘llf_handle_netlink_events’:
llf.c:347: warning: pointer of type ‘void *’ used in arithmetic
llf.c:353: error: storage size of ‘stream’ isn’t known
llf.c:369: warning: implicit declaration of function ‘iw_init_event_stream’
llf.c:371: warning: pointer of type ‘void *’ used in arithmetic
llf.c:385: warning: implicit declaration of function ‘iw_extract_event_stream’
llf.c:353: warning: unused variable ‘stream’
[\CODE]
qui c'è il codice: https://prj.tzi.org/cgi-bin/trac.cgi/browser/aodv-uu-dtn/trunk/llf.c
main.o: In function `cleanup':
main.c:(.text+0x1b0): undefined reference to `rt_table_destroy'
la funzione rt_table_destroy è inclusa nel file routing_table.c a sua volta dichiarato nelle intestazioni del main.c:
[code]#include "routing_table.h[\CODE]
siccome sono abbastanza niubba in programmazione, mi sapreste dire come risolvere? in un post simile ho letto che bisogna effettuare un linking, ma siccome il comando che dò per la cross compilazione è om-conf, non so come risolvere!
OK facendo un attimino funzionare la testa, ho modificato un makefile.am (aggiungendo semplicemente un "\" e andando a capo per elencare tutti i sorgenti) ed ho risolto questo problema.
purtroppo ne è sorto un altro:
[CODE] In file included from llf.c:23:
debug.h:56:25: warning: ISO C does not permit named variadic macros
In file included from /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include/linux/rtnetlink.h:5,
from llf.c:34:
/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include/linux/if_link.h:43: error: expected specifier-qualifier-list before ‘__u64’
In file included from /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include/linux/rtnetlink.h:7,
from llf.c:34:
/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include/linux/neighbour.h:92: error: expected specifier-qualifier-list before ‘__u64’
llf.c:36:19: error: iwlib.h: Nessun file o directory
llf.c: In function ‘llf_rtnl_open’:
llf.c:106: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness
llf.c: In function ‘index2name’:
llf.c:150: error: storage size of ‘irq’ isn’t known
llf.c:150: warning: unused variable ‘irq’
llf.c: In function ‘iw_get_interface_data’:
llf.c:186: warning: implicit declaration of function ‘iw_sockets_open’
llf.c:206: warning: implicit declaration of function ‘iw_get_range_info’
llf.c:210: warning: implicit declaration of function ‘iw_sockets_close’
llf.c: In function ‘mac_to_ip’:
llf.c:242: warning: format ‘%x’ expects type ‘unsigned int *’, but argument 4 has type ‘int *’
llf.c:242: warning: format ‘%x’ expects type ‘unsigned int *’, but argument 5 has type ‘int *’
llf.c:246: warning: implicit declaration of function ‘iw_ether_aton’
llf.c: In function ‘llf_print_event’:
llf.c:264: warning: unused variable ‘buffer’
llf.c: In function ‘llf_handle_netlink_events’:
llf.c:347: warning: pointer of type ‘void *’ used in arithmetic
llf.c:353: error: storage size of ‘stream’ isn’t known
llf.c:369: warning: implicit declaration of function ‘iw_init_event_stream’
llf.c:371: warning: pointer of type ‘void *’ used in arithmetic
llf.c:385: warning: implicit declaration of function ‘iw_extract_event_stream’
llf.c:353: warning: unused variable ‘stream’
[\CODE]
qui c'è il codice: https://prj.tzi.org/cgi-bin/trac.cgi/browser/aodv-uu-dtn/trunk/llf.c