As regards point 1 :
The def file is auto-generated during the 'make' process - which is 'dmake', in my case. How does one influence the contents of the def file that is created by that automated procedure ?
As regards point 2 : I changed Foo.xs so that it now has:
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
int __declspec(dllexport) foo(int x, int y) {
return x + y;
}
MODULE = Foo PACKAGE = Foo
PROTOTYPES: DISABLE
int
foo (x, y)
int x
int y
But, according to dumpbin /exports, 'Foo.dll' still exports only '_boot_Foo' and 'boot_Foo'.
I'm using the MinGW compiler - don't know if that has any bearing on the matter ... apologies if I'm being dense.
Cheers, Rob
| [reply] [d/l] [select] |
I'm using the MinGW compiler ...
If you follow the link I belatedly added to my response you'll see that dllexport is an MS specific extension. Presumably the __declspec() bit is a part of some standard otherwise you'd be getting an error.
Whether MinGW supports a similar extension I don't know. They can build .sos an .dlls so must have encountered similar problems.
- How does one influence the contents of the def file that is created by that automated procedure ?
I looked that up a while ago. There is mention in the pod for E::MM of a coniguration attribute DL_FUNCS which seems to be something to do with it.
- I changed Foo.xs so that it now has:
See above:)
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] [select] |
There is mention in the pod for E::MM of a coniguration attribute DL_FUNCS which seems to be something to do with it
Yes - that's probberly the way to go. I tried inserting 'DL_FUNCS' => {'Foo' => ['boot_Foo', 'foo']}, into WriteMakefile() of the Makefile.PL. Having done that, dumpbin reports that Foo.dll exports XS_Foo_foo, _XS_Foo_foo, boot_Foo and _boot_Foo. I'm wanting to see that foo, _foo, boot_Foo, and _boot_Foo are exported. (I've just got to work out how to remove that "XS_Foo_" prefix.)
Cheers, Rob
| [reply] [d/l] |