Ok, I’m running Borland 5.01 on Windows 2000, and I’m trying to compile this little OpenGl sample I got from a book, and my error reads:

Declaration syntax error
Multiple declaration for ‘WINGDIAPI’
Earlier declaration for ‘WINGDIAPI’

-and it keeps repeating these three lines until it can’t display them all. What in the name of Alan Turing is this WINGDIAPI, and how to I kill the error??? Please help!

Hi !

WINGDIAPI is a #define for function declarations, this is defined in wingdi.h, you are including another header file that also #defines WINGDIAPI, but it’s not the same as the one in wingdi.h


#include <windows.h>

Alright, so I included the windows header, and now I get either a fatal exception or “Access violation occurred at 0x023F9EB1: Attempt to access 0x06C50000.” This programming stuff sucks sometimes.

Also this: Fatal: Bad object file ‘D:\BC5\LIB\glut32.lib’ near file offset 0