PDA

View Full Version : WINGDIAPI conflict wth condefs.h



Cardinal
09-21-2001, 03:24 PM
I read through the old messages, and my error sounds very similar to, but not identical to the typical WINGDIAPI error. windows.h is included before gl.h. I am using the Borland 4.0 Compiler.




#include <condefs.h>
#include <windows.h>
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glaux.h>

USEUNIT("matrix.cpp");
USEUNIT("vector.cpp");

int main( ... )
{ ... }


generates the normal WINGDIAPI error, but if you do this:




//#include <condefs.h>
#include <windows.h>
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glaux.h>

//USEUNIT("matrix.cpp");
//USEUNIT("vector.cpp");

int main( ... )
{ ... }


compiles perfectly fine... (except you can't reference matrix.cpp or vector.cpp)

switching the order of windows/condefs doesn't help. Does anyone have a suggestion?

thx, Cardinal

[This message has been edited by Cardinal (edited 09-21-2001).]

[This message has been edited by Cardinal (edited 09-24-2001).]

[This message has been edited by Cardinal (edited 09-24-2001).]

V--man
09-22-2001, 01:00 PM
>>>the typical WINGDIAPI error<<<

Can't help if you're not specific. Maybe it is being redefined???

V-man

Cardinal
09-24-2001, 07:43 AM
[C++ Error] gl.h(1152): E2141 Declaration syntax error.
[C++ Error] gl.h(1153): E2238 Multiple declaration for 'WINGDIAPI'.
[C++ Error] gl.h(1152): E2344 Earlier declaration of 'WINGDIAPI'.