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


    xxxxxx.lib(xxxxxx.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

    1. 先看看你的模块是否是64位,这个一般都是,如何配置64位工程,这里就不说了;

    2. 查看该模块链接的静态库或者dll是否是64位的;

    Configuration-->kinker-->General-->Additional Library Directories 看看是链接到64位的目录;

    Configuration-->kinker-->input-->Additional Dependencies  中的库是否都是64位;

    3. 看看你链接的库是否都按64位编译的,临时文件,目标文件是否生成到64位目录;

    4. 看看你链接的静态库:

    Configuration-->Librarian-->General-->Additional Dependencies

    Configuration-->Librarian-->General-->Additional library Directories

    是否有依赖32位内容,其实静态库不需要链接静态库,我就是因为静态库去依赖了32位的,导致64位模块编译失败。

    5. 最后实在不行试试改这个地方:

    Configuration-->Preprocessor-->Preprocessor Definitions-->WIN32改为_WIN64

    总结:

    xxxxxx.lib(xxxxxx.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

    这个错误提示想告诉你的是,该64位模块依赖了32位的东西,确保你依赖的库都是32位,并且依赖的库没有包含别人32位的东西。

  • 相关阅读:
    Nginx+uWsgi+Django+Python+MongoDB+mySQL服务器搭建
    MongoDB的副本集Replica Set
    Google论文之一Bigtable学习翻译
    python类的成员和装饰器
    nginx代码分析进程和模块初始化
    MongoDB的分片Sharding
    MongoDB的分片和副本集部署
    安装sql server 2008 r2
    Hello, World!
    vs2010仿Myeclipse open file 功能插件
  • 原文地址:https://www.cnblogs.com/yuzhould/p/4476115.html
Copyright © 2020-2023  润新知