I am using the CImg library for the first time and I get compilation errors with a simple test program that just includes CImg.h. Why is that? How can I fix this?
Program code:
#include "../headers/CImg.h"
using namespace cimg_library;
int main()
{
return 0;
}
Compilation errors:
In function 'FILE* cimg_library::cimg::fopen(const char*, const char*)':
5065|error: '_fileno' was not declared in this scope
In function 'int cimg_library::cimg::fseek(FILE*, INT_PTR, int)':
5093|error: '_fseeki64' was not declared in this scope
In function 'INT_PTR cimg_library::cimg::ftell(FILE*)':
5102|error: '_ftelli64' was not declared in this scope
This was done on a PC with a 64 bit Windows 8.1.
Command:
g++.exe -Wall -fexceptions -g -std=c++11 -c "D:\informatics\Projects\image experiments\Rectangle to circle stretcher\sources\main.cpp" -o obj\Debug\sources\main.o
I tried this without the -std=c++11
part and I get 2 errors instead of 3. I don't get 5065|error: '_fileno' was not declared in this scope
. Same happens if I replace it with -std=gnu++11
I also tried it on my laptop, which runs a 64 bit version of windows 7, and the same happens there.
So far, I have a work around for the first error, but nothing for the other two.