Groups | Blog | Home
all groups > visual c libraries > march 2004 >

visual c libraries : ___mb_cur_max unresolved: Yet MSVCRTD exports it!


deane
3/13/2004 3:56:05 AM
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

Ronald Laeremans [MSFT]
3/15/2004 10:22:58 AM
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]
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]
Vc7\lib folder, it shows an export for ___mb_cur_max. So why isn't the
linker finding it?
[quoted text, click to view]
multithreaded DLL version of the runtime library.

DotNetJunkies User
7/26/2004 11:08:10 AM
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


---
Posted using Wimdows.net NntpNews Component -

AddThis Social Bookmark Button