作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试构建 Casablanca使用 boost 1.56,但由于 Casablanca 的 -Werror
将 boost 警告转为错误,我的构建一直失败旗帜
例如:
CXX=g++ BOOST_ROOT=${boost} cmake .. -DCMAKE_BUILD_TYPE=Release
产生错误(太多无法显示)
/home/matt/workspace/opal2/o2linux64/Libs/boost/1.56/include/boost/system/error_code.hpp:222:36: error: ‘boost::system::errno_ecat’ defined but not used [-Werror=unused-variable]
static const error_category & errno_ecat = generic_category();
^
/home/matt/workspace/opal2/o2linux64/Libs/boost/1.56/include/boost/system/error_code.hpp:223:36: error: ‘boost::system::native_ecat’ defined but not used [-Werror=unused-variable]
static const error_category & native_ecat = system_category();
^
cc1plus: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/cpprest.dir/http/client/http_client_msg.cpp.o] Error 1
我似乎无法在谷歌上找到任何补救措施,尽管我发现人们使用 1.56 构建的帖子并且没有提到禁用 Werror
在src/CMakeList.txt
(偶然地似乎允许代码构建)
最佳答案
要防止编辑 Casablanca 的 CMakeLists.txt,可以在运行 cmake 命令时添加 -DWERROR=OFF 参数,例如:
cmake -DCMAKE_BUILD_TYPE=Release -DWERROR=OFF <path to src>
请注意,cmake 可以缓存选项值,因此最好在干净的构建目录中重新运行 cmake
关于c++ - 具有 boost 1.56 的卡萨布兰卡因 -Werror 而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33133725/
我有一个卡片列表: hand = ["KC", "QC", "4C", "0S"] 而且我总是想获得排名最高的卡片,就像在这个列表中一样 rank_cards = ["2", "3",
我正在使用 Opencv 2.4.3,我的显卡是 ATI,但我一直在阅读 CUDA 启用了 Nvidia,这是否意味着只要我有 ATI 显卡我就不能使用 gpu 功能? 最佳答案 的确,CUDA 技术
在 Android 中实现 Stripe 时,有一个 CardInputWidget 给你一个 Card 对象,然后你得到一个token 来自 Stripe API 使用该卡,最后您将该 token
我是一名优秀的程序员,十分优秀!