|
Boost Testing : |
From: Daniel James (daniel_james_at_[hidden])
Date: 2006-02-27 18:29:49
On 2/27/06, Vladimir Prus <ghost_at_[hidden]> wrote:
> No wonder. See the "FIXME" before the "link" action. In V1, the DMC toolset
> does not seem to support dynamic linking at all. And in V2, DMC toolset is
> 1-1 port of V1 version. But in V2, dynamic linking is default.
>
> Can you tell me what command line option to the linker should I pass to
> create DLL, as opposed to an executable. And does that option produces
> import lib automatically, or should I run separate executable? And what's
> the command line for that with DMC?
Normally I just use dmc.exe, which takes care of everything, so I'm
mostly clueless. But luckily, it tells you what it's doing so I have a
rough idea of what's needed.
If you look at the link command, the last argument is a '.def' file,
this should contain instructions for the linker. This needs to be
generated in order to tell the linker to produce a DLL. Normally, dmc
generates one automatically which looks like this:
LIBRARY "library_name.dll"
DESCRIPTION 'library_name as a DLL'
EXETYPE NT
SUBSYSTEM WINDOWS
CODE SHARED EXECUTE
DATA WRITE
So if you can generate a file like that (with library_name changed to
whatever you require, and maybe a more relevant description), and pass
it as the last argument to the existing link command in dmc.jam, it
should produce a dll. The implib flag to the command tells it to
produce an import lib.
In case you need it, here's links to the relevant documentation,
although I think all you need to do (at least for now) is generate
that .def file.
http://www.digitalmars.com/ctg/ctgDefFiles.html
http://www.digitalmars.com/ctg/ctgLinkSwitches.html#implib
I hope that helps. I look into this some more soon.
Daniel