Mixing VC 6 and .NET libs

G

Guest

Hi,

I wondering whether we can mix VC++ and .NET libs. we are in the process of
porting our VC6 code to VC 2003 .NET but would like to know whether I need to
port all thirdparty tools to .NET immediately.
 
C

Carl Daniel [VC++ MVP]

Saran said:
Hi,

I wondering whether we can mix VC++ and .NET libs. we are in the
process of porting our VC6 code to VC 2003 .NET but would like to
know whether I need to port all thirdparty tools to .NET immediately.

If your libraries contain and use 100% your own code, then you might be able
to mix, but if you use MFC, ATL or STL then you definitely can't.

The basic lib format is forward compatible, as is the name decoration
scheme, but the MS supplied libraries have had internal changes that make
them immiscible between VC6 and VC7 or later.

If your code uses wchar_t and you compile with /Zc:wchar_t, the VC7-produced
code won't be compatible with an existing VC6-compiled library, and
vice-versa.

In general, it's best to not mix, but you can get away with it under the
right circumstances (witness the fact that the Platform SDK does not need to
contain both VC6 and VC7 libraries).

-cd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top