Porting C++ code from VC6 to .NET: linker issues 
Author Message
 Porting C++ code from VC6 to .NET: linker issues

I'm getting these link errors:

LINK : warning LNK4044: unrecognized option '/MDd'; ignored
libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol
__malloc_dbg referenced in function "void * __cdecl operator new(unsigned
int,struct std::_DebugHeapTag_t const &,char *,int)"

libcpmtd.lib(locale.obj) : error LNK2001: unresolved external symbol
__malloc_dbg
libcpmtd.lib(_tolower.obj) : error LNK2019: unresolved external symbol
__malloc_dbg referenced in function __Tolower
libcpmtd.lib(xwcsxfrm.obj) : error LNK2019: unresolved external symbol
__malloc_dbg referenced in function __Wcsxfrm
libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol
__free_dbg referenced in function "void __cdecl operator delete(void
*,struct std::_DebugHeapTag_t const &,char *,int)"

libcpmtd.lib(xwcsxfrm.obj) : error LNK2001: unresolved external symbol
__free_dbg
libcpmtd.lib(locale.obj) : error LNK2019: unresolved external symbol
__realloc_dbg referenced in function "private: void __thiscall
std::locale::_Locimp::_Addfac(class std::locale::facet *,unsigned int)"

libcpmtd.lib(xmbtowc.obj) : error LNK2019: unresolved external symbol
__CrtDbgReport referenced in function __Mbrtowc_lk
./Gedi.dll : fatal error LNK1120: 4 unresolved externals

In the course of porting some projects to use managed extensions my first
step is just trying to compile as unmanaged.  These functions are part of
the standard C runtime library.  But as the first line shows, using /MDd
isn't the right way to link these functions.  Can anyone advise?

Thank you,
Josh



Sun, 06 Feb 2005 02:29:30 GMT  
 Porting C++ code from VC6 to .NET: linker issues
I added the /MDd option in the wrong area of the VS GUI.  I've narrowed down
my linker errors to 5.

I recognize two tokens from the errors.  cout and npos.  Since these are
part of the standard C++ library shouldn't the /MDd option link them in?

I've been stuck on this for way too long.  Any help would be very much
appreciated.  Perhaps I'm asking a question that is so obvious that those
with the answers don't want to bother.  If that's the case perhaps someone
could offer a pointer to the documentation because I'm having a very hard
time figuring this one out.

Thank you,
Josh


LINK : error LNK2020: unresolved token (0A000049)
B
LINK : error LNK2020: unresolved token (0A000050) __imp__DebugHeapTag
LINK : error LNK2020: unresolved token (0A000051) __imp__Fpz
LINK : error LNK2020: unresolved token (0A000076) __imp_cout



Mon, 07 Feb 2005 05:33:23 GMT  
 Porting C++ code from VC6 to .NET: linker issues
It turned out the problem was that the /NODEFLIB option was being used.  I
guess this got set when I used a wizard to upgrade the project from VC6.


Quote:
> I added the /MDd option in the wrong area of the VS GUI.  I've narrowed
down
> my linker errors to 5.

> I recognize two tokens from the errors.  cout and npos.  Since these are
> part of the standard C++ library shouldn't the /MDd option link them in?

> I've been stuck on this for way too long.  Any help would be very much
> appreciated.  Perhaps I'm asking a question that is so obvious that those
> with the answers don't want to bother.  If that's the case perhaps someone
> could offer a pointer to the documentation because I'm having a very hard
> time figuring this one out.

> Thank you,
> Josh


> LINK : error LNK2020: unresolved token (0A000049)

B

- Show quoted text -

Quote:
> LINK : error LNK2020: unresolved token (0A000050) __imp__DebugHeapTag
> LINK : error LNK2020: unresolved token (0A000051) __imp__Fpz
> LINK : error LNK2020: unresolved token (0A000076) __imp_cout



Sat, 12 Feb 2005 03:57:33 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. access violation due to bad CString copy ctor when porting from VC6 to VC7 (VC++.NET)

2. problem porting vc6 mfc app in .net

3. Porting old Borland code <string> issues

4. pointers to migration issues from existing C++ code to managed C++ or C#

5. pointers to migration issues from existing C++ code to managed C++ or C#

6. Problem in porting code from VC++ 6.0 to VS.Net (using STL)

7. porting code to VS.NET...errors in CStringT.

8. porting visual c++ 6.0 addins to visual studio.net

9. Porting native C++ app to .NET

10. Over 3,000 syntax errors from cstdlib and cstdio when porting to VS.Net C++

11. Newbie porting EventSample.cs to ASP.NET

12. Friend linker error Visual C++ .NET 2003

 

 
Powered by phpBB® Forum Software