mercredi 6 décembre 2017

MinGW -- incomplete type when using std::future

I've written code that compiles, and executes on Linux without issue using gcc. However, the same code doesn't appear to be compiling on Windows using MinGW. Here is the code snippet:

std::future<void> gameTimer;

This is the error that I get:

In file included from ..\prohect\main.cpp:1:0: field 'gameTimer' has incomplete type 'std::future<void>
    std::future<void> gameTimer;
                      ^~~~~~~~~
In file included from ..\project\project.h:12:0, from ..\project\main.cpp:1: declaration of 'class std::future<void>'
    class future;
          ^~~~~~

Am I missing something from the MinGW installation?

Aucun commentaire:

Enregistrer un commentaire