Chris Bowlby writes: > Hi All, > > For the last few months I've been testing various capabilities of > libtool and how it creates links between a parent application and a > module (in the case of a plug-in system, etc). I've run into a snag in > relation to undefined symbols, here's some sample code that gives me > the error: > > main.cxx > > #include "testlog.hxx" > #include "testuser.hxx" > > static TestLog *log = NULL; > static TestUser *user = NULL;
[snip] > test.cxx > > #include "testlog.hxx" > #include "testuser.hxx" > > extern TestLog *log; > extern TestUser *user; static variables like those in main.cxx are visible only within the translation unit (roughly: source file) that they are defined. Remove the "static" to make the log or user variables visible to loaded modules. Michael Poole _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool
