[OpenWalnut-Dev] W_LOADABLE_MODULE
Mathias Goldau
Mathias.Goldau at nf.mpg.de
Fri Apr 12 00:49:50 CEST 2013
Hi Alex,
I think you made the point clear that marking module for our
moduleLoader is different in the Toolbox and in the OW repository. The
problem is, that in OW repo each module becomes *one* shared object or
dynamic lib, while in the Toolbox all modules are packed into one shared
library. Thats is the reason why it is different.
Some days ago, I coded the gaussianProcess stuff and had a similar
setup, as I wanted to have a new experminetal DataSet for two modules.
So I put also two modules into one OW module, and it was the very same
way I had to deal with the W_LOADABLE_MODULE stuff as we have it now
within the Toolbox.
Comming now to an answer on whether it will be possible to unify both
approaches or not. I can not clearly say if it will be possible, I guess
that a shared object could not have multiple symbols with the same name.
And as I read the W_LOADABLE_MODULE macro in WModule.h I hardly remember
that you can only use W_LOADABLE_MODULE macro *once* within your
library. I fear this is the reason.
However, I could imagine that we could split up the macro into two
parts, but than W_LOADABLE_MODULE might loose its beauty, but I would
wait on Sebastian's comment on that.
HTH, math
On 04/11/2013 10:28 PM, Alexander Wiebel wrote:
> Hi fellow developers,
> maybe I am trying to do something you consider to be strange.
> Nevertheless, I would like to hear your opinion on the following.
>
> I want to maintain a module in the modules repository, i.e. separately
> from the main OpenWalnut repo. I followed the example and used a
> "WToolkit.cpp" file as shown. ... it works. Then I tried to use the same
> code of the same module in another OpenWalnut by simply copying the
> module's directory into "src/modules" of the other OpenWalnut and adding
> the module to a toolbox. However, when I do this I need to add the
> W_LOADABLE_MODULE line to make it compile. So far so good. One could
> think, that I can simply add the same line to the modules repo. However,
> if I do this it conflicts with the WLoadModule stuff in WToolkit.cpp.
>
> I hope you were able to follow my explanations. Now my question is: Is
> there a way to have code that works for both variants, i.e. in
> "src/modules" and in a separate repo with WToolkit?
>
> Cheers,
> Alex
> _______________________________________________
> OpenWalnut-Dev mailing list
> OpenWalnut-Dev at lists.informatik.uni-leipzig.de
> http://lists.informatik.uni-leipzig.de/mailman/listinfo/openwalnut-dev
>
> Archive: http://lists.informatik.uni-leipzig.de/pipermail/openwalnut-dev/
>
More information about the OpenWalnut-Dev
mailing list