Boost logo

Boost :

Subject: [boost] mingw and windows.h
From: Raffi Enficiaud (raffi.enficiaud_at_[hidden])
Date: 2018-01-17 19:41:38

Hi all,

I recently pushed something for boost.test on develop that is apparently
breaking the builds on mingw:

What I do in the code is this:

#ifdef _WIN32
#include <Windows.h>

and then later

#ifdef _WIN32
class setcolor {

  void set_console_color(std::ostream& os, WORD *attributes = NULL) const {
    DWORD console_type;

/// some additional windows specific code


I thought that this would be enough for having the windows specific
code, but apparently mingw disagrees with the error that some windows
specific define is not there.

Is this an issue with the code, the SDK, the machine? I have no
experience with mingw, but if we are able to include windows.h, then we
have to have the defines there (the missing macro is there since Windows

Thanks for the help,

Boost list run by bdawes at, gregod at, cpdaniel at, john at