Hi,
How can I use DLLs and libraries compiled with Visual Studio 2008 from within a Visual Studio 2003 project?
Thanks, Dan
Hi,
How can I use DLLs and libraries compiled with Visual Studio 2008 from within a Visual Studio 2003 project?
Thanks, Dan
You cannot do that. The only possible thing will be to recompile to target .NET 1.x.
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!
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.