Re: overriding global operator new/delete
Ben Voigt wrote:
"Tom Widmer [VC++ MVP]" <tom_usenet@hotmail.com> wrote in message
news:u2JAntm$GHA.4680@TK2MSFTNGP04.phx.gbl...
Ben Voigt wrote:
"Tom Widmer [VC++ MVP]" <tom_usenet@hotmail.com> wrote in message
news:OKHpB7Q$GHA.3456@TK2MSFTNGP02.phx.gbl...
So I think you'll have to override new and delete separately for each
module (exe and dll) in your application that you want to use the memory
It should be possible to accomplish this with a static library. Can the
OP possibly somehow combine these functions with the import library to
create a single static library, or are object code libraries and import
libraries necessarily distinct?
Yes, a static library would work fine I think, with the static library
containing the implementations of operators new and delete. Linking each
module (except the DLL containing the memory manager!) with this static
library would be sufficient I think.
What I was wondering was, is it possible to merge the .obj file with said
implementations with the DLL import library, so that there's only one .lib
file to link with?
I don't know of a way to do that, no.
Tom