help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Undefined symbol when loading g++ created library


From: Adam Nielsen
Subject: Undefined symbol when loading g++ created library
Date: Sun, 27 Nov 2005 13:00:34 +1000

Hi,

I've got a main program, which we'll call Main, and a library, which
we'll call Plugin.  The idea is that Main loads the Plugin and calls a
function in Plugin to get a pointer to some classes implemented in
Plugin.

This all works, except I've just created a class in Plugin, which
inherits from a class implemented in Main:

  Main
   |
   +-- RootClass
        |
        +-- SubClass1

  Plugin
   |
   +-- SubClass2 (inherited from RootClass)


Now when Main tries to load Plugin using dlopen() it fails, telling me
RootClass is an undefined symbol.  I assumed that it would find the
implementation of RootClass in Main and use that (I thought that was
what the g++ -rdynamic option was for.)

Is this not possible, or have I just missed something trivial?

Thanks,
Adam.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]