PDA

View Full Version : compile error, maybe to do with glaux



nick2price
11-23-2008, 08:54 AM
I am getting an error when compiling my code, i think it might be to do with not having glaux. The error is


1>skybox.cpp
1>c:\users\nick\desktop\university\graphics, c++\skybox\skybox\skybox.cpp(12) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> c:\program files\microsoft visual studio 9.0\vc\include\stdio.h(237) : see declaration of 'fopen'
1>c:\users\nick\desktop\university\graphics, c++\skybox\skybox\skybox.cpp(14) : error C2664: 'auxDIBImageLoadW' : cannot convert parameter 1 from 'char *' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

It is relating to the lines


if((aFile = fopen(fileName, "rb")) == NULL) return false;

image_record = auxDIBImageLoad(fileName);

What can i put in place of these lines?
cheers

IneQuation.pl
11-23-2008, 12:01 PM
This is an ordinary coding error, not OpenGL-related. The compiler says it can't perform implicit conversion between a string (char array) and a LPCCWSTR.

I would've told you what to do if I knew WinAPI, but I don't, as I prefer sticking to cross-platform code.

By the way, dude, this isn't your first thread like this. Get a C/C++ tutorial and learn the language properly first so that at least you can understand the compiler error messages, then start tinkering with OpenGL.