On 23/01/07, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:

Pete Robbins wrote:
> Actually this is definitely a problem. The mechanism as it is today
means
> you can not have one extension library that depends on another unless we
> separate out the static method into it's own dll for each extension.
> It may
> "work" on Linux but it probably shouldn't and it will not work on MacOS.
>
> So the tuscany_sca_rest_reference library can not link with
> tuscany_sca_rest_interface as both define the same symbol. We could have
> just one library that initializes all the rest extensions but either
> way I
> need to refactor this code OR we change the name of the initialization
> method to something that the runtime can derive from the library name
> itself... such as <library_name>_initialize where library name is the
> root
> name for the library i.e. the "lib" and ".so" are removed (or the ".dll"
> removed for windows) e.g. tuscany_sca_rest_interface
>
> This is probably a better solution as someone may wish to write an
> extension
> that extends the CPP extension for instance.
>
> Cheers,
>
> On 23/01/07, Pete Robbins <[EMAIL PROTECTED]> wrote:
>>
>> This seems to build fine on linux and does not warn about the duplicate
>> symbol. I'll go back and check why Mac is complaining.
>>
>> Cheers,
>>
>>
>>  On 23/01/07, Pete Robbins <[EMAIL PROTECTED]> wrote:
>> >
>> > I've run in to a problem building the REST binding extension on
MacOS.
>> > Our extension mechanism works by having a well known exported
>> method from a
>> > library that implements an extension;
>> tuscany_sca_extension_initialize()
>> >
>> > In the REST binding the extension is split into interface, service,
>> > reterence and a mod_rest library.
>> > The tuscany_sca_rest_reference library links with the
>> > tuscany_sca_rest_interface library both of which export the same
named
>> > method. This causes linking problems on Mac. I'm not sure why we
>> don't see
>> > the same problem on Linux or Windows!
>> >
>> > Perhaps we need to refactor this code to have just one extension
>> > initialization method for the whole REST binding??
>> >
>> > Cheers,
>> >
>> > --
>> > Pete
>> >
>>
>>
>>
>> --
>> Pete
>
>
>
>

+1 for deriving the init method name from the library name. This
resolves the name collision issue and allows for packaging of
interface/service/reference extensions in their own libs and
dependencies between them.

--
Jean-Sebastien


I've checked in a change to avoid name clashes with the initialization
methods.

--
Pete

Reply via email to