You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to compile that on Ubuntu 13.10 ( I see that it has been a while)
rm -f radeonvolt *.o
gcc -O3 -Wall -c radeonvolt.c
gcc -O3 -Wall -c i2c.c
gcc -O3 -Wall -c vt1165.c
gcc -O3 -Wall -lrt -lpci -o radeonvolt radeonvolt.o i2c.o vt1165.o
radeonvolt.o: In function `enum_cards':
radeonvolt.c:(.text+0xfa): undefined reference to `pci_alloc'
radeonvolt.c:(.text+0x104): undefined reference to `pci_init'
radeonvolt.c:(.text+0x10c): undefined reference to `pci_scan_bus'
radeonvolt.c:(.text+0x1a0): undefined reference to `pci_lookup_name'
radeonvolt.c:(.text+0x206): undefined reference to `pci_cleanup'
collect2: error: ld returned 1 exit status
make: *** [radeonvolt] Error 1
having
ii libpci-dev 1:3.1.9-6ubuntu9 i386 Linux PCI Utilities (development files)
ii libpci3:i386 1:3.1.9-6ubuntu9 i386 Linux PCI Utilities (shared library)
ii libpciaccess-dev:i386 0.13.2-1 i386 Generic PCI access library for X - development files
ii libpciaccess0:i386 0.13.2-1 i386 Generic PCI access library for X
ii pciutils 1:3.1.9-6ubuntu9 i386 Linux PCI Utilities
The text was updated successfully, but these errors were encountered:
For Ubuntu 16.04., changing the order in Makefile helped to resolve the problem, just shift ${LDFLAGS} to the end of the line, like this:
${CC} ${CFLAGS} -o $@ $^ ${LDFLAGS}
The library reference has to be listed after the ".o" file, since the linker/loader processes the arguments in order.
I am trying to compile that on Ubuntu 13.10 ( I see that it has been a while)
having
The text was updated successfully, but these errors were encountered: