Qt <winInet.h> 在构建时输出许多 C4430 和 C2146 错误
Qt <winInet.h> outputs many C4430 & C2146 Errors on build
错误列表
我想我已经在这里的QT项目文件中包含了winInet.h的库:
project.pro
QT += qml quick network
CONFIG += c++11
SOURCES += main.cpp
xmap.cpp
RESOURCES += qml.qrc
LIBS += -lwininet
每次我尝试 qmake 并构建头文件时都会显示许多语法错误,我很好奇这是否因为我的 qt 项目文件语法错误。
xmap.h
#ifndef XMAP_H
#define XMAP_H
#include <iostream>
#include <WinInet.h> // <--- ISSUE
#include <Windows.h>
#include <time.h>
class xmap
{
public:
xmap();
// test connection to websites for data
int CheckConnection(int connection = 0);
// pull data from online sources to be evaluated by the model
void RequestAndSaveData(std::string filename);
};
#endif // XMAP_H
在Visual Studio 2010中尝试包含winhttp.h时C++与307错误基本相同,只是使用WinHttp而不是WinInet。
不过,相同的解决方案:在<WinInet.h>
之前包括<Windows.h>
。
相关文章:
- 递归函数计算序列中的平方和(并输出过程)
- 如何使用 < 和 > 命令获取 c++ 中的输入和输出?
- 请解释"函数1(p1,p2,p3);"的输出
- C++:将控制台输出存储在宏中更好吗
- 创建一个函数以在输入为负数或零时输出字符串.第一次执行用户定义的函数
- 如何在OMNET++中指定与命令行参数组合的输出文件名
- 为什么我的代码在输出中增加了93天
- 如何从void函数输出字符串
- 输入到文件并输出到另一个文件,并将流文件传递给函数
- AES加密到解密未正确输出
- 如何将c++程序的一些输出传递给shell,以便在shell中使用
- 使用C++程序合并排序没有得到正确的输出
- 为什么我不能在不创建字符串变量的情况下使用函数的字符串输出
- C++格式化输出问题
- 将值从二维数组输出到文本文件
- 集合上的输出迭代器:assign和increment迭代器
- 在while循环中输入带有std::cin的字符串后,控制台会输出大量胡言乱语
- Qt <winInet.h> 在构建时输出许多 C4430 和 C2146 错误
- 当许多线程的输出是可变长度时,我应该如何合并它?
- basic_filebuf.输出文件中有许多奇怪的文本