首页 > 解决方案 > 传感器模拟器构建失败并出现 LNK1112 错误

问题描述

我正在尝试按照此处的步骤构建和运行传感器模拟器:http ://www.movesense.com/docs/esw/getting_started/#build-commands-sensor-simulator

我有:

  1. 拉了回购
  2. 创建 simuBuild 文件夹
  3. cmake -G "Visual Studio 16 2019" -DMOVESENSE_CORE_LIBRARY=../MovesenseCoreLib/ ../samples/blinky_app
  4. 然后打开Project.sln文件
  5. 选择 Movesense 作为启动项目

现在,当我尝试使用Debug->运行它时Start new instance,出现以下错误movesense-coreD.lib(ResourceClient.obj) : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64':我该如何解决这个问题?

我也尝试将Linker->设置Command line: Additional Options为,%(AdditionalOptions) /machine:x86但这也失败了,错误类似但略有不同:Movesense.dir\Debug\App.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86

标签: visual-studiomovesense

解决方案


有同样的问题。降级到Visual Studio 2017有所帮助。显然它不适用于 2019 版本。


推荐阅读