如何在conanfile.txt中设置编译器和架构设置?我试过把它放进去
[settings]
arch=x86
但我越来越Unrecognized field: settings
.我该怎么做?
您可能会将conanfile.txt
与配置文件混淆。这是一个链接,说明如何格式化和使用配置文件。
一个名为myprofile
的文件:
[env]
# Where is our C compiler
CC=/usr/bin/x86_64-w64-mingw32-gcc
# Where is our CPP compiler
CXX=/usr/bin/x86_64-w64-mingw32-g++
[settings]
# We are building in Ubuntu Linux
os_build=Linux
arch_build=x86_64
# We are cross building to Windows
os=Windows
arch=x86_64
compiler=gcc
# Adjust to the gcc version of your MinGW package
compiler.version=6.3
compiler.libcxx=libstdc++11
build_type=Release
你可以像这样使用它:
$ conan install --profile /abs/path/to/myprofile # abs path
$ conan install --profile ./relpath/to/myprofile # resolved to current dir
$ conan install --profile myprofile # resolved to user/.conan/profiles/myprofile