tags:

views:

281

answers:

2

Hi,

I'm writing a DLL for a very old program that was compiled using Visual Studio 6. This program exports some functions that return pointers to standard library containers, and I'm (unsurprisingly) running into problems when I attempt to do anything with them from my DLL, which is compiled under VS 7. The source code for the program isn't available, so recompiling it with VS 7 isn't an option.

Is there any way I can reconfigure VS 7 to link against the import libraries from the VS 6 CRT? I do have VS 6 installed (and thus all the necessary .libs and headers), but I would much rather use a newer IDE. I've tried checking "Ignore Default Libraries" in VS 7 and adding the VS 6 lib/include paths to the project settings, then adding MSVCPRT.LIB to the additional dependencies, but I just get a ton of unresolved externals from the CRT when I build the project.

Thanks a lot!

+2  A: 

This might help.

Matthew Talbert
No, that's about the C runtime. It totally ignores C++. No surprise, because that's a lot harder.
MSalters
Thanks a lot for the replies. That link looks very promising, but if I can't use any of the C++ runtime functions I don't think it'll work. I may end up just going with Tim's suggestion and linking a static wrapper library into my project. I thought I might have to do something like that, but was hoping there'd be a simpler solution.
Tos
+2  A: 

The CRT and STL were both majorly revised between VS6 and VS7. If you can make this really work, I would be surprised.

I would probably build a "wrapper" module in VS6 that exposes the data in a more neutral way.

Tim Sylvester