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:
http://www.boost.org/development/tests/develop/developer/output/igaztanaga-develop-gcc-4-2c++03-boost-bin-v2-libs-test-test-version-uses-module-name-test-gcc-4-2c+-dbg-dbg-symbl-off.html

What I do in the code is this:

----------
#ifdef _WIN32
#include <Windows.h>
#endif
----------

and then later

----------
#ifdef _WIN32
class setcolor {

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

/// some additional windows specific code

#endif
----------

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
2000).

Thanks for the help,
Raffi


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk