Re: How can I generate a file dependent on linker output, which the linker then needs to generate the final dll using VS2005?
Use the Pre-Link build event to run the linker, process the output
and generate the .DEF file. Then the regular linker pass can use
whatever you generated in the .DEF file.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://vcfaq.mvps.org
=====================================
"Anthony Wieser" <newsgroups-sansspam@wieser-software.com> wrote in message
news:%23x3Jt6bsHHA.4424@TK2MSFTNGP04.phx.gbl...
I need to process the map file that's generated by link on a C++ project,
in order to generate the the .DEF file I really want to link with.
Effectively, I want to make only some of the exports from my DLL
available, and also I want to reference them by ordinal only. For those
of you who have looked at how MFC works, will recognize this as being
similar to the method in MFC80.def
I can't really see any way to do this, as there doesn't seem to be any
simple way to run the link command again with similar arguments to those
generated automatically.
However, I did come up with this idea:
Write a new program named link.exe that runs the original link command
with the command line specified,
then run whatever processing my program needs
then run the link command again.
Is there any easy way to get MSBUILD to use a different tool for link,
like setting some environment variable or instance, or must I resort to
making the search path for exe's find mine first?
Secondly, if I do go down this route, will I be able to get the output of
the real link tool back into MSDEV?
Anthony Wieser
Wieser Software Ltd