I am trying to compile the following CImg sample code with std=c++0x and MingW:
#include "CImg.h"
using namespace cimg_library;
int main() {
    CImg<unsigned char> img(640,400,1,3); 
    img.fill(0); 
    unsigned char purple[] = { 255,0,255 }; 
    img.draw_text(100,100,"Hello World",purple);
    img.display("My first CImg code");
    return 0;
}
When I compile using:
g++ -std=c++0x HelloWorld.cpp -lgdi32
I get the following error:
error: '_fileno' was not declared in this scope
But when I compile without std=c++0x, it works perfectly:
g++ HelloWorld.cpp -lgdi32
How can I compile CImg with c++0x enabled?
 
    