Programming Trick: locating unresolved dependencies in gcc compilation

If your compilation (or your importing within python of a .so library) fails complaining of an "undefined symbol", use nm to locate it within the relevant libraries. For instance,

nm -o /usr/lib/*.so* | grep Undefined <symbol>

then add the library (those listed with "T" define the symbol, and do not just use it) to the linking step in your makefile.

This one was a killer to find.

Nov 21, 2003

dependencies (/progtricks)
2003-11-21, 18:57 [edit]

  Login:   Password:   [rss] [cc] [w3] [css]

© M. Vallisneri 2012 — last modified on 2010/01/29

Tantum in modicis, quantum in maximis