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

简介: 错误现场:操作系统:WIndows 7 x64编译的项目:LightGBM(Light Gradient Boosting Machine)参考:微软开源分布式高性能GB框架LightGBM安装使用有小伙伴遇到问题:您好,我按照您的教程安装lightgbm,但是提示这样的错误WindowsError: [Error 193] %1 不是有效的 Win32,好像是因为python和dll文件不一致,但是我的python也是64bit的呀我尝试想编译32位的,结果就遇到这个问题了。

错误现场:

操作系统: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
|
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
169 0
编译mate-control-center:error: required directory ./help does not exist
编译mate-control-center:error: required directory ./help does not exist
106 0
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
170 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
170 0
|
Perl
ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1
ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1
719 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 问题解决
192 0
configure: error: readline library not found/libreadline.so: undefined reference to tputs
configure: error: readline library not found/libreadline.so: undefined reference to tputs
394 0