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

1 这个error是什么原因造成的

cmake默认选择的是x86,即32位的生成子。

2 怎么解决这个error

在cmake ..的时候,在后面加上“-G "Visual Studio 12 2013 Win64"”选项即可。

3 怎么在CMakeLists.txt中进行相应的设置来解决这个问题

这个还未知。

原文地址:https://www.cnblogs.com/hustdc/p/6849212.html