小编vla*_*lad的帖子

构建期间使用 Qt 时出错:C2872:“字节”:不明确的符号

我有带有编译器 Desktop x86-windows-msvc2019-pe-64bit 的Qt Creator 、Qt Creator 4.11.1 (“基于 Qt 5.14.1 MSVC2017,32 位),于 2020 年 2 月 5 日构建,Boost 库 1.72 以及 Microsoft Visual Studio Express 2019.

在 Qt 中构建程序期间,我收到此错误:

C2872:“字节”:不明确的符号

实际上解决方案写在这个页面上: https ://studiofreya.com/2018/01/06/visual-studio-2017-with-cpp17-and-boost/#stdbyte-ambigously-symbol-and-rpcndr.h问题是我正在使用 Qt (而不是 VS)并且不知道如何关闭此编译器行为。

你知道如何避免这个错误吗?

我的项目文件的开头如下所示:

QT       += core gui
QT       += charts

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++17

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings …
Run Code Online (Sandbox Code Playgroud)

c++ qt boost

0
推荐指数
1
解决办法
5379
查看次数

标签 统计

boost ×1

c++ ×1

qt ×1