且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我可以在 Visual Studio 2008 中使用 Visual Studio 6 编译的 C++ 静态库吗?

更新时间:2023-09-27 15:22:10

我不应该想为什么不 - 只要你保持通常的 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.