Using VC++ 6.0 libraries

  • Thread starter Anthony Gallagher
  • Start date
A

Anthony Gallagher

I have a bunch of libraries compiled using VC++ 6.0, and I am trying to
recompile one of our projects using VC++ .NET. I get all kind of linker
errors (specially in STL calls). How do I get rid of these errors??

Anthony
 
H

Hendrik Schober

Anthony Gallagher said:
I have a bunch of libraries compiled using VC++ 6.0, and I am trying to
recompile one of our projects using VC++ .NET. I get all kind of linker
errors (specially in STL calls). How do I get rid of these errors??

Recompile those libs using VC++ .NET.

Schobi

--
(e-mail address removed) is never read
I'm Schobi at suespammers org

"My hair style calls into immediate question all my judgements."
Scott Meyers
(http://www.google.de/[email protected])
 
A

Anthony Gallagher

Thanks for the response, but you must be kidding. We do not even have the
code to some of these libraries, as we did not develop them. Do you mean to
say Microsoft has broken compatibility with the libraries developed with VC
6.0, there is no way to use them, and we are stuck with VC6.0??

Anthony
 
D

Don Dumitru [MSFT]

Templates are historically hard to get binary-level compatability with.
Remember, to use a template, you use the source code of the template. So,
if one object model (the VC 6.0 one) is compiled against a template (using
the source code from the VC 6.0 headers), and attempts to link against
another object module (the VC 7.0 one) which was compiled against a
different version of the template (using the source code from the VC 7.0
headers), it's not gonna work. The different object modules are going to
have different definitions for the templates, and those definitions are
going to conflict somehow - one possible conflict would be for it to not be
possible to pass template-derived objects between the two libraries because
of the definition of the class itself is actually different, and another way
would be for the template code in the object module to not be able to link
because it requires some supporting static function that has changed (which
is what you are describing, with linker errors).

In order to maintain backward compat. with the template libraries, Microsof
would have to simply not change them - keep them completely static. Sadly,
that means that other people would be complaining about bugs not being
fixed, the libraries not coming up to be in line with the spec, etc.

You could try linking against the old VC 6.0 version of the STL static
library, to see if it resolves the linker errors. But if you are actually
passing STL-derived classes between your VC 7.0-compiled code and the old VC
6.0-compiled code, you are going to be in trouble (unless somehow not a
single line of code has changed for that particular template, between the
two versions).

--Don
 
H

Hendrik Schober

Anthony Gallagher said:
Thanks for the response, but you must be kidding. We do not even have the
code to some of these libraries, as we did not develop them. Do you mean to
say Microsoft has broken compatibility with the libraries developed with VC
6.0, there is no way to use them, and we are stuck with VC6.0??

AFAIK the new VC is link-compatible with the
old one. However, once you start to pass stuff
around that changes between versions, there's
no way it's gonna work. And the std lib did
change -- for good.
Anthony
[...]

Schobi

--
(e-mail address removed) is never read
I'm Schobi at suespammers org

"My hair style calls into immediate question all my judgements."
Scott Meyers
(http://www.google.de/[email protected])
 

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