Problem with PCI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, 
I'm trying to use the linux kernel API's for PCI in a program as shown
below.. The code is compiling but not linking...
it is giving the following linker error
----------------------------------------------------------------------
/tmp/cce56FvJ.o: In function `main':
/tmp/cce56FvJ.o(.text+0x29): undefined reference to `pci_find_deivice'
-----------------------------------------------------------------------
#include <linux/config.h> 
#include <linux/pci.h>
#define VENDOR_ID 0x8086
#define DEVICE_ID 0x1234
 
int main(int argc, char **argv) {
 	struct pci_dev* d;     
	d = (struct pci_dev *) pci_find_deivice(VENDOR_ID,DEVICE_ID,d);
	return 0; 
}
---------------------------------------------------------------------
I would appriciate it if someone could tell me how to link it or what
libraries i need to link this program

Thanks in advance !!!
Chester

-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux