登录 用户中心() [退出] 后台管理 注册
   
您的位置: 首页 >> SoftHub关联区 >> 主题: [vscode]mingw64 编译出 32 位     [回主站]     [分站链接]
[vscode]mingw64 编译出 32 位
clq
浏览(215) - 2022-01-01 23:06:08 发表 编辑

关键字:

[vscode]mingw64 编译出 32 位

上一篇我们说到了如何在 vscode 中配置出调试环境。但这样出来的默认是 64 位程序,但不巧的是,我们的 dll 是 32 位的。

本来加参数 "-m32" 就可以了的。不巧,我用的是 seh 和版本。幸好我还有 sjlj 版本,所以换一下编译器就可以了。

可惜还是有问题,这样编译出的 32 位程序是无法调试的。因为我的 vscode 是 64 位的,所以 ...

----------------------------------------------------------------
参考
https://bbs.csdn.net/topics/391866590


hsbf2008 2016-09-06
我去,我和你的问题一模一样!!! 我在google上搜到了答案。 http://stackoverflow.com/questions/19690504/how-do-i-compile-and-link-a-32-bit-windows-executable-using-mingw-w64 That depends on which variant of toolchain you're currently using. Both DWARF and SEH variants (which come starting from GCC 4.8.0) are only single-target. You can see it yourself by inspecting the directory structure of their distributions, i.e. they contain only the libraries with either 64- and 32-bit addressing, but not both. On the other hand, plain old SJLJ distributions are indeed dual-target, and in order to build 32-bit target, just supply -m32 flag. If that doesn't work, then just build with i686-w64-mingw32-g++. 也就是说mingw-w64不是有很多分支吗?就是那个异常实现方式不同。 但是SEH和DWARF都是只有一个平台的(只有x32或者只有x64),坑。。。 他说老式的SJLJ方式有两个平台的,这个时候可以用-m32来就可以了。 如果还不行,就只能用mingw32来编译了。。。





总数:0 页次:1/0 首页 尾页  
总数:0 页次:1/0 首页 尾页  


所在合集/目录
vscode 更多



发表评论:
文本/html模式切换 插入图片 文本/html模式切换


附件:



NEWBT官方QQ群1: 276678893
可求档连环画,漫画;询问文本处理大师等软件使用技巧;求档softhub软件下载及使用技巧.
但不可"开车",严禁国家敏感话题,不可求档涉及版权的文档软件.
验证问题说明申请入群原因即可.

Copyright © 2005-2020 clq, All Rights Reserved
版权所有
桂ICP备15002303号-1