[Distutils] Suggested additions to function argument list
Lyle Johnson
jlj@cfdrc.com
Fri, 12 May 2000 13:36:43 -0500
> [Just curious (and unrelated to python extensions): What about
> resources?
> How are they built into the executable?]
Sorry, left that off by accident; the resources file is the last argument.
The full command line would be:
ILINK32 [options] objects, [exe], [mapfile], [libs], [deffile], [resfile]
>
> So what to do?
>
> - REQUIRE a def file? (Extension writers on unix would like not to have to
> care
> about this)
> - Trust the extension writer to use the (compiler specific?) pragmas?
> (Same as above)
> - Dynamically build a def-file and delete it after the build?
>
> Maybe the (distutils-generated) temporary def-file would be the best.(?)
>
I'd prefer not to *require* a .DEF file, since by convention most people
will name their module initialization function "init" + modulename. The
compiler class can then generate the def-file on the fly (if needed) and use
it appropriately. The terminally clever developer who wants the (private)
name of his module initialization function to be something else would be
required to provide a .DEF file which exports that function as "init" +
module, though -- there's obviously no way for distutils to guess that.
By the way: again unlike Microsoft, Borland's linker prepends an underscore
to exported functions' names, so the automatically-generated .DEF file for
BorlandCCompiler will need to look something like this:
EXPORTS
initmodule=_initmodule
--Lyle