impdef, msvc++ 6, and GMP
ike at evheuristics.com
ike at evheuristics.com
Sat Nov 8 11:28:46 CET 2003
On 8 Nov 2003 at 10:57, Kevin Ryde wrote:
>
> Sounds fair. Do you just need to prepend
>
> LIBRARY libgmp-3
> EXPORTS
> ?
>
Unfortunately it's more than just a prepend because DUMPBIN /EXPORTS
gives a lot more info than just the symbol list. The symbol list is one
column of a symbol table embedded in some other stuff: it's easy enough
though for a casual windows user to import the space-delimited table into
a spreadsheet and cut and paste the appropriate column.
On 8 Nov 2003 at 9:50, Sisyphus wrote:
> Oh ..... but I did find impdef via Google (without praying):
This may well work in this case because the windows libgmp-3.dll
functions get exported using _cdecl (which is why hand-building the .def
works anyway) but I dunno for sure since I haven't tried it. I also
didn't try pulling out impdef from my old 16 bit msvc version. The
problem with any general purpose "impdef.exe" though is that it would
have to take into account calling conventions and decoration styles from
whatever compiler/language was used to build the dll -- only conjecture
on my part but I suspect that this is why ms doesn't appear to support an
impdef anymore.
On 8 Nov 2003 at 10:57, Kevin Ryde wrote:
> > run-time dynamic linking to the .dll, but that has a different set of
> > hassles.
>
> If it works then that'd be easiest.
>
On 8 Nov 2003 at 9:50, Sisyphus wrote:
> I've wondered at how that might be achieved. Is it something that's set
A link to run-time dynamic linking example is (sorry for the long url):
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/dllproc/base/using_run_time_dynamic_linking.asp
I don't know if run-time linking would be easiest for the casual user or
not. After loading the library at run time I think you would need to get
a function pointer to *each* gmp function you wanted to use from the dll
with a GetProcAddress call and then call the gmp function through the
pointer. Seems like this would require logistics headaches on the part of
the user or else some substantial changes to gmp.h. Am I missing
something?
Ike
More information about the gmp-discuss
mailing list