0

List of Errors

I think I have included the library for winInet.h in the QT Project file here:

project.pro

QT += qml quick network

CONFIG += c++11

SOURCES += main.cpp \
xmap.cpp

RESOURCES += qml.qrc

LIBS += -lwininet

Everytime I try qmake and build the header file shows many syntax errors and I'm curious if its because I'm wrong in my qt project file syntax.

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
Gepard
  • 111
  • 1
  • 9

1 Answers1

1

Essentially the same as C++ 307 Errors when trying to include winhttp.h in visual studio 2010, except that was using WinHttp instead of WinInet.

Still, same solution: include <Windows.h> before <WinInet.h>.

MSalters
  • 173,980
  • 10
  • 155
  • 350