All constructors are added to a single PerModuleInterface

20 views
Skip to first unread message

Daniel Moodie

unread,
Nov 16, 2016, 3:58:54 PM11/16/16
to Runtime-Compiled C++
Hi,

I've been using RCC for a while now and there's some perplexing behavior on Linux.

I have my project split into many different dynamically loaded shared library plugins. On windows each constructor in each plugin is added to the plugin specific PerModuleInterface.  Thus when I call PerModuleInterface::SetProjectIdForAllConstructors, I set the ID for all projects in just that one plugin.
This is achieved because RCC is compiled as a static library and thus on windows a separate copy of the PerModuleInterface singleton is compiled into each final plugin.

However it appears on Linux this is not the case.  I have tried both as a shared library on Linux and as a static library with "-fPIC" and all plugins reference a single PerModuleInterface.  
I'm fairly familiar with how objects are linked together on Windows, but it's still a mystery to me as to how I can achieve what I want on Linux.  Any feedback would be appreciated.

I've also tried include the ObjectInterfacePerModuleSource.cpp file in each plugin with no success.

Thank you for your time,
Daniel Moodie.

Doug Binks

unread,
Nov 17, 2016, 5:32:53 AM11/17/16
to Runtime-Compiled C++
This may be due to default visibility with gcc/clang.


If this doesn't help I then I'll ask around - I recall someone I know doing roughly what you do so they might know more.
Reply all
Reply to author
Forward
0 new messages