Bernhard Schmalhofer wrote:
> Ron Blaschke wrote:
>> I haven't checked the details, but I think this will not work, as it
>> seems to generates a list of all symbols beginning with nci_, but
>> 'int_cb_D4' is used, too.
> nci_test.c is used only for testing. So there is no harm in renaming the
> symbols as needed.

>> Previously, I have proposed adding 'PARROT_API' to declarations, and
>> grep for them, or expand them to '__declspec(dllexport)' on Windows.
> This might work for 'parrot.dll', but not for libnci_test.dll, as it
> isn't a part of the interface on Parrot.

How about this: We separate things into 2 steps.
1) Create a .sym file for each relevant compilation unit.
2) Join the .sym files for all to-be-linked objects and create the
.def file. (on Windows)

Now things boil down to creating the .sym files.  These might be
created by grepping the source for C<nci_>, C<Parrot_>, etc, or
by whatever script created the compilation unit.

Disclaimer: I might have shamelessly stolen one idea or the other from
the perl source. ;-)

Ron




Reply via email to