为什么我不能在MinGW中链接64位.lib文件? [英] Why can't I link 64-bit .lib file in MinGW?

查看:711
本文介绍了为什么我不能在MinGW中链接64位.lib文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用MinGW在Eclipse CDT中的项目中使用第三方.lib/.dll文件(可能在Visual Studio中编译).

I need to use a third party .lib / .dll file (probably compiled in Visual Studio) with my project in Eclipse CDT using MinGW.

我可以成功地动态链接到32位版本(使用32位MinGW),但不能链接到64位版本(使用64位MinGW).当我运行64位版本时,调用第三方功能时会崩溃.

I can dynamically link with the 32-bit version (using 32-bit MinGW) successfully but not with the 64-bit version (using 64-bit MinGW). When I run the 64-bit version, it crashes when invoking the third party function.

要使64位工作还需要做些其他事情吗?

Is there something different that I need to do to get 64-bit working?

谢谢, 艾伦

推荐答案

对我来说,解决方案是针对32位版本和64位<用于64位版本的strong> .dll 文件.

The solution for me was to link against the 32-bit .lib file for 32-bit builds and the 64-bit .dll file for 64-bit builds.

我仍然不确定不一致的原因,因此欢迎提出任何意见.

I'm still not sure where the inconsistency comes from, so any comments are welcome.

艾伦

这篇关于为什么我不能在MinGW中链接64位.lib文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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