Код: Выделить всё
#include <linux/config.h>
#include <linux/pci.h>
int main (void)
{
if (! pci_present ())
{
printf ("No pci device present\n");
return -1;
}
else printf ("Pci device were found\n");
return 0;
}Пробую компилировать.
Код: Выделить всё
# gcc -O2 -Wall test.c -o testПолучаю сообщение.
Код: Выделить всё
test_pci.c: In function `main':
test.c:6: warning: implicit declaration of function `pci_present'
test.c:8: warning: implicit declaration of function `printf'
/tmp/cc6sNhvX.o(.text+0xa): In function `main':
: undefined reference to `pci_present'
collect2: ld returned 1 exit status