TODO: Format using MediaWiki syntax
!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
In the example you are building program foo that uses object file bar.o that has depencies to references in libbaz.a that is stored in the /path/to/mylib directory. If you have say three libraries with circular dependencies you must specify the libraries mutltiple times until there are no more undefined references. E.G.| gcc -o foo -L/path/to/libraries bar.o -lbaz -lfiz -ljaz -lbaz
In the example baz has dependencies on fiz and jaz, fiz has depencies on jaz and baz and jaz may have dependencies on baz.
Recent comments
3 days 6 hours ago
3 days 6 hours ago
5 days 16 hours ago
1 week 2 days ago
6 weeks 3 days ago
6 weeks 3 days ago
6 weeks 3 days ago
7 weeks 1 day ago
7 weeks 6 days ago
10 weeks 1 day ago