Hi Deane,
In general you need to use the same version of the runtime for every
component you link into an image.
Ronald Laeremans
Visual C++ team
[quoted text, click to view] "deane" <anonymous@discussions.microsoft.com> wrote in message
news:43DF94A3-0739-4E63-BCE1-34FF05040E5B@microsoft.com...
> I have a DLL which I am trying to link in debug mode. To that end I've
specified the multithreaded debug DLL version of the runtime lib which, if
I've read the docs correctly, should leave me linking to MSVCRTD.LIB
[quoted text, click to view] >
> My DLL is also linking to a static lib which was built using LIBCMT.LIB.
When I try to link I get the following error:
>
> LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main
referenced in function _mainCRTStartup
>
> To get around that, I specified that the linker should ignore libcmt. Now
I get the following errors when I link:
>
> librib.lib(illum.o) : error LNK2001: unresolved external symbol
___mb_cur_max
>
> But if I run 'dumpbin /exports' on the MSVCRTD.LIB file in VC++.NET's
Vc7\lib folder, it shows an export for ___mb_cur_max. So why isn't the
linker finding it?
[quoted text, click to view] >
> Note that the problem goes away if I build my DLL using the non-debug
multithreaded DLL version of the runtime library.