fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

简介: 版权声明:本文为 testcs_dn(微wx笑) 原创文章,非商用自由转载-保持署名-注明出处,谢谢。 https://blog.csdn.net/testcs_dn/article/details/62443945 ...
版权声明:本文为 testcs_dn(微wx笑) 原创文章,非商用自由转载-保持署名-注明出处,谢谢。 https://blog.csdn.net/testcs_dn/article/details/62443945

错误现场:

操作系统:WIndows 7 x64

编译的项目:LightGBM(Light Gradient Boosting Machine)

参考:微软开源分布式高性能GB框架LightGBM安装使用

有小伙伴遇到问题:

您好,我按照您的教程安装lightgbm,但是提示这样的错误WindowsError: [Error 193] %1 不是有效的 Win32,
好像是因为python和dll文件不一致,但是我的python也是64bit的呀
我尝试想编译32位的,结果就遇到这个问题了。
解决方法:

如下图:


项目属性,平台选择了Win32,但是 VC++ Directories 中有的选项中还存在 x64 的配置,所以就出现了这个问题,

把所有的都改为 x86 的,再编译就可以了。

======================文档信息===========================

版权声明:非商用自由转载-保持署名-注明出处

署名(BY) :testcs_dn(微wx笑)

文章出处:[无知人生,记录点滴](http://blog.csdn.NET/testcs_dn)

==============欢迎关注我的个人微信订阅号(微wx笑)============

目录
相关文章
|
Ubuntu Unix Linux
成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
123 0
|
Linux
ERROR: 2 matches found based on name: network product-server_default is ambiguous
ERROR: 2 matches found based on name: network product-server_default is ambiguous
163 0
|
Unix Linux 异构计算
成功解决 ERROR: An error occurred while performing the step: “Building kernel modules“. See /var/log/nv
成功解决 ERROR: An error occurred while performing the step: “Building kernel modules“. See /var/log/nv
成功解决 ERROR: An error occurred while performing the step: “Building kernel modules“. See  /var/log/nv
checking build system type... ./config.guess: unable to guess system type/you must specify one
checking build system type... ./config.guess: unable to guess system type/you must specify one
164 0
|
Shell
Detected problems with app native libraries (please consult log for detail): lib.so: text relocation
Detected problems with app native libraries (please consult log for detail): lib.so: text relocation
165 0
|
Java
The type XXX cannot be resolved. It is indirectly referenced from required .class files
The type XXX cannot be resolved. It is indirectly referenced from required .class files
131 0
|
网络协议 关系型数据库 Linux
onfigure: error: no acceptable C compiler found in $PATH See `config.log' for more details 问题解决
onfigure: error: no acceptable C compiler found in $PATH See `config.log' for more details 问题解决
184 0
解决 lupdate warning: no TS files specified.
解决 lupdate warning: no TS files specified.
​Error -4075: File not found. An error occurred merging module <MODULENAME> for feature <FEATURENAME>.
​Error -4075: File not found. An error occurred merging module <MODULENAME> for feature <FEATURENAME>.
123 0
​Error -4075: File not found. An error occurred merging module <MODULENAME> for feature <FEATURENAME>.