Undefined reference, why?
Im working on a project to interface a simple USB chip, but this really isn't important in this case. The problem is that I cannot compile, because I get an "Undefined rereference to 'ftdi_init' error. ftdi_init is a function.
Here's my case. I've got two libraries, one called ftdilib library, which needs the usblib library. I've installed both libraries in the standard way ( tar, configure, make, make install ). Here is what doesn't compile:
int main(int argc , char *argv)
If I compile this I get an error: Undefined reference to 'ftdi_init'. I've checked ftdi.h and the ftdi_init declaration is in it. The ftdi.c file also contains the code for ftdi_init function. However, I couldn't find any #include <ftdi.c> in the ftdi.h.
So what are the most frequent causes for errors like mine?