简体   繁体   English

在VC ++中使用Borland C ++代码

[英]Using Borland C++ Code in VC++

Is there a way to access Borland output in VC++, for method calls and other stuff? 有没有一种方法可以访问VC ++中的Borland输出,以进行方法调用和其他操作?

Thanks 谢谢

My info may be (way) outdated, but what I had to before was to make sure that Borland output a COFF format OBJ or LIB file to link with VC. 我的信息可能(已经)过时了,但是我之前要做的就是确保Borland输出COFF格式的OBJ或LIB文件以与VC链接。

The other option is to have Borland output a DLL, and then use that from VC++. 另一个选择是让Borland输出DLL,然后从VC ++使用它。 Name mangling and calling conventions may cause a pain. 名称修改和调用约定可能会引起痛苦。 I honestly haven't used a Borland compiler in half a decade(even though I used to work there, a decade and half ago), so I'm not sure if a LIB for a Borland compiled DLL will link nicely with VC++. 老实说,我已经有五年没有使用Borland编译器了(即使我曾经在那里工作了十年半),所以我不确定Borland编译DLL的LIB是否可以很好地与VC ++链接。

If all else fails, compile a DLL with the Borland compiler, use Dumpbin to find the exports, then LoadLibrary and GetProcAddress to get the function pointers. 如果所有其他方法均失败,则使用Borland编译器编译DLL,使用Dumpbin查找导出,然后使用LoadLibrary和GetProcAddress获取函数指针。

Create a static library, then link it into VC++ project. 创建一个静态库,然后将其链接到VC ++项目。 Be careful with calling conventions. 调用约定时要小心。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM