DanJ
DanJ

Reputation: 3495

Is it possible to use VS2008 built libraries from a VS2003 solution?

How can I use DLLs and libraries compiled with Visual Studio 2008 from within a Visual Studio 2003 project?

Thanks, Dan

Upvotes: 2

Views: 626

Answers (3)

Harper Shelby
Harper Shelby

Reputation: 16581

In general, it's unlikely that you'll be able to use compiled C++ libraries (dynamic or static) with another compiler unless one of the compilers is explicitly listed as binary compatible with the other.

Some answers have mentioned 'third party' or Windows DLLs. However, I'd be willing to bet that most, if not all, of those DLLs were using C APIs, and not C++. The C++ ABI (Application Binary Interface) is not standardized - things like name mangling are not guaranteed to be identical across different versions of the same compiler, and calling conventions can vary based on compiler options.

A quick Google search didn't turn up any links that looked usable, but as I said in the beginning, in general, you cannot use a compiled C++ library, static or dynamic, in code compiled with a different compiler. C is a different beast, and that answer is completely different!

Upvotes: 1

Dani van der Meer
Dani van der Meer

Reputation: 6207

You can definitely use a DLL. I used the same third-party DLLs in VS2003 and VS2008. To make things a lot easier, you should only pass plain old data types to and from the DLL functions. Structs or classes is much more difficult, but should also be possible in most cases between VS2003 and VS2008.

Check out this questions for far more in-depth info than I can give you.

Upvotes: 1

Anton Gogolev
Anton Gogolev

Reputation: 115859

You cannot do that. The only possible thing will be to recompile to target .NET 1.x.

Upvotes: 0

Related Questions