头文件报错情况之一

来源:互联网 发布:双十一淘宝怎么抢东西 编辑:程序博客网 时间:2024/05/22 02:02

 e:\vc98\include\gl\gl.h(1152) : error C2144: syntax error : missing ';' before type 'void'
e:\vc98\include\gl\gl.h(1152) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
e:\vc98\include\gl\gl.h(1152) : fatal error C1004: unexpected end of file found

头文件的顺序

#include "stdafx.h"

#include <windows.h>

#include <gl/gl.h>

#include <gl/glu.h>

…………

主要是前两个头文件的顺序

正确排列之后就没问题了