我可以在 Visual Studio 2008 中使用 Visual Studio 6 编译的 C++ 静态库吗? [英] Can I use a Visual Studio 6 compiled C++ static library in Visual Studio 2008?

查看:41
本文介绍了我可以在 Visual Studio 2008 中使用 Visual Studio 6 编译的 C++ 静态库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 Visual Studio 2008 中使用使用 Visual Studio 6 编译的 C++ 静态库 (.lib)?

Is it possible to use a C++ static library (.lib) compiled using Visual Studio 6 in Visual Studio 2008?

推荐答案

我不应该想为什么不 - 只要你保持通常的 CRT 内存边界(即如果你在库函数内部分配内存,总是从在库内部 - 通过调用库中的函数来进行释放).

I shouldn't think why not - as long as you keep the usual CRT memory boundaries (ie if you allocate memory inside a library function, always free it from inside the library - by calling a function in the lib to do the freeing).

这种方法适用于用各种编译器编译的 dll,静态链接的库也应该可以.

this approach works fine for dlls compiled with all kinds of compilers, statically linked libs should be ok too.

这篇关于我可以在 Visual Studio 2008 中使用 Visual Studio 6 编译的 C++ 静态库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆