I have an application with plugins (loading using dlopen), it worked until now, when I faced problem I cannot solve on my own.

There are some plugins. One, lets say, contains some class - **MakerClass**. Second plugin, which is (indirectly, using "host" application calls) called by function in plugin One. Second plugin should look at some data and write result to **MakerClass**. But there is a problem - when some function in Second plugin calls (MakerClass\*)mc->WriteNumber(12345), I've got unresolved symbol error. 

In code lang, it is looks like this (simplified):

Host app:

```
HostApp::CallPlugin(void * data) { 
    this->second->Foo(data);
}

```

Plugin One, main.cpp, compiled to main.o and linked with maker.o to main.so

```
#include "maker.h" //here is defined MakerClass
....
void SomeFunction() {
    MakerClass mc;
    mc.DoSomeInitialization();

    this->host->CallPlugin(&mc);
}

```

Plugin Second, main.cpp:

```
#include "maker.h" 
SecondPlugin::Foo(void * data) {
    MakerClass * mc = (MakerClass*)data;
    mc->WriteData(1234); // This will raise problem - while dlopen (if RTLD_NOW) or when called (if RTLD_LAZY used)
}

```

It should be solution to use RTLD\_GLOBAL, but every plugin have init. methods with same name, so it makes problem, especially when RTLD\_NOW used and plugin Second is loaded before One.

So... exists some clean solution? Thanks very much!