linker

Printer-friendly version

The linker consistently giving undefined references

Stop Undefined References

There are many reasons why you might receive undefined references. The typical reason is that you have not specified an appropriate library or your command line order is incorrect. In order for a library to resolve references the dependency for the library must precede the library in the command line order.
E.G.

 gcc -o foo -L/path/to/mylib bar.o -lbaz

Site Status

Site maintenance completed May 25th, 2012 at 12:38 UTC