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.LI
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 _mainCRTStartu
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_ma
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
Note that the problem goes away if I build my DLL using the non-debug multithreaded DLL version of the runtime library
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
> 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
> 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:
>
[quoted text clipped - 5 lines]
>
> 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?
> Note that the problem goes away if I build my DLL using the non-debug multithreaded DLL version of the runtime library.
DotNetJunkies User - 26 Jul 2004 19:08 GMT
Hi,
I am getting the same error, but with an ATL-based COM project. As far as I know it doesn't have a main(). So what is going on? Any help would be appreciated.
Royce
---