As the title suggests, I am trying to load an image using DevIL, before passing it to OpenGL. I am using this piece of code as error control
const char* filename = "back.bmp";
if (!ilLoadImage(filename))
{
throw runtime_error(std::string("Unable to load image") +filename);
}
which, for the if statement, returns the error
error C2664: 'ilLoadImage' : cannot convert parameter 1 from 'const char *' to 'const wchar_t *'
If I define filename
as const wchar_t* filename
, I get the error
error C2664: 'ilLoadImage' : cannot convert parameter 1 from 'const char *' to 'const wchar_t *'
So for now I will not tire you with my curiosity of why a [filename].bmp file is of type wchar_t*, or what wchar_t is, which Google confused me over, and I will only ask what I must to make it work: Why is it not working? What have I missed? There must be a very short solution for this, I am sure. It just looks like that kind of error.
Thank you.