繁体   English   中英

在Visual Studio 2015中建立vsal项目时出错

[英]Error when building vsal project in visual studio 2015

我是刚开始使用cmake / visual studio进行编译和编译项目的人,所以请放轻松我;)。

我正在尝试配置VSAL库。 我使用CMake GUI进行配置和生成(Visual Studio 2015编译器)。

在Visual Studio中构建ALL_BUILD时,出现以下错误:

1>------ Build started: Project: vsal, Configuration: Release x64 ------
1>libboost_program_options-vc140-mt-1_64.lib(value_semantic.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
2>------ Build started: Project: vsal_player, Configuration: Release x64 ------
2>LINK : fatal error LNK1181: cannot open input file '..\lib\Release\vsal.lib'
========== Build: 0 succeeded, 2 failed, 2 up-to-date, 0 skipped ==========

一件事困扰着我,为什么CMake使用x86_amd64而不是amd64编译器。

Check for working CXX compiler: G:/Programske datoteke (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
Check for working CXX compiler: G:/Programske datoteke (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works

版本:

  • Visual Studio专业版2015
  • CMake的3.8.0
  • 提升1.64.0
  • vsal 1.0

谢谢您的帮助 !

您正在编译一个64位程序,但是您要链接的Boost库是一个32位库。

以64位模式重新编译Boost库将解决您的问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM