includes and binary code

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

 



I think my problem is a concept failure:
When I include in my programs a #include <afile.h> I am telling the compiler to look for afile.h and paste the code in my program. So far so good. But the header file usually only holds definitions and not the implementation of the functions, so what I don't understand is how can the system (compiler) know where and how to find the library or the piece of binary code that actually implements the functions defined in the afile.h


All this comes because trying to compile some application I get the following errors:
/home/soraberri/Desarrollo/estudioC/estudio_l2test/src/estudio_l2test.c:231: undefined reference to `strtoba'
estudio_l2test.o(.text+0x680):/home/soraberri/Desarrollo/estudioC/estudio_l2test/src/estudio_l2test.c:231: undefined reference to `baswap'
/home/soraberri/Desarrollo/estudioC/estudio_l2test/src/estudio_l2test.c:337: undefined reference to `baswap'
estudio_l2test.o(.text+0xb54):/home/soraberri/Desarrollo/estudioC/estudio_l2test/src/estudio_l2test.c:338: undefined reference to `batostr'
/home/soraberri/Desarrollo/estudioC/estudio_l2test/src/estudio_l2test.c:652: undefined reference to `hci_devba'
estudio_l2test.o(.text+0x14df):/home/soraberri/Desarrollo/estudioC/estudio_l2test/src/estudio_l2test.c:654: undefined reference to `str2ba'


All this functions are actually defined in /usr/include/bluetooth/bluetooth.h
and in the program I try to compile there is this line:
#include <bluetooth/bluetooth.h>



I hope this is a very simple question for you

regards


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux