c++ - FreeImage 不能与 CEGUI 一起工作

标签 c++ opengl cegui

我想使用 FreeImageCEGUI在一起。

所以我包含这样的标题:

#include <RendererModules/OpenGL/CEGUIOpenGL.h>
#include <RendererModules/OpenGL/CEGUIOpenGLGeometryBuffer.h>
#include <RendererModules/OpenGL/CEGUIOpenGLRenderer.h>
#include <RendererModules/OpenGL/CEGUIOpenGLRenderTarget.h>
#include <RendererModules/OpenGL/CEGUIOpenGLTexture.h>
#include <RendererModules/OpenGL/CEGUIOpenGLTextureTarget.h>
#include <RendererModules/OpenGL/CEGUIOpenGLViewportTarget.h>
#nclude  <FreeImage>

但问题是,当我编译时,出现以下错误:

Error   10  error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1152
Error   11  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1152
Error   12  error C2146: syntax error : missing ';' before identifier 'glAccum' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1152
Error   13  error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1152
Error   14  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1152
Error   15  error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1153
Error   16  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1153
Error   17  error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1153
Error   18  error C2146: syntax error : missing ';' before identifier 'glAlphaFunc' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1153
Error   19  error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1153
Error   20  error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1153
Error   21  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1153
Error   22  error C2146: syntax error : missing ';' before identifier 'GLboolean'   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1154
Error   23  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1154
Error   24  error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1154
Error   25  error C2146: syntax error : missing ';' before identifier 'glAreTexturesResident'   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1154
Error   26  error C2371: 'APIENTRY' : redefinition; different basic types   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1154
Error   27  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1154
Error   28  error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1155
Error   29  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1155
Error   30  error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1155
Error   31  error C2146: syntax error : missing ';' before identifier 'glArrayElement'  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1155
Error   32  error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1155
Error   33  error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1155
Error   34  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1155
Error   35  error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1156
Error   36  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1156
Error   37  error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1156
Error   38  error C2146: syntax error : missing ';' before identifier 'glBegin' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1156
Error   39  error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1156
Error   40  error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1156
Error   41  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1156
Error   42  error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1157
Error   43  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1157
Error   44  error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1157
Error   45  error C2146: syntax error : missing ';' before identifier 'glBindTexture'   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1157
Error   46  error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1157
Error   47  error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1157
Error   48  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1157
Error   49  error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1158
Error   50  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1158
Error   51  error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1158
Error   52  error C2146: syntax error : missing ';' before identifier 'glBitmap'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1158
Error   53  error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1158
Error   54  error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1158
Error   55  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1158
Error   56  error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1159
Error   57  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1159
Error   58  error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1159
Error   59  error C2146: syntax error : missing ';' before identifier 'glBlendFunc' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1159
Error   60  error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1159
Error   61  error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1159
Error   62  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1159
Error   63  error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1160
Error   64  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1160
Error   65  error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1160
Error   66  error C2146: syntax error : missing ';' before identifier 'glCallList'  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1160
Error   67  error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1160
Error   68  error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1160
Error   69  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1160
Error   70  error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1161
Error   71  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1161
Error   72  error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1161
Error   73  error C2146: syntax error : missing ';' before identifier 'glCallLists' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1161
Error   74  error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1161
Error   75  error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1161
Error   76  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1161
Error   77  error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1162
Error   78  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1162
Error   79  error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1162
Error   80  error C2146: syntax error : missing ';' before identifier 'glClear' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1162
Error   81  error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1162
Error   82  error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1162
Error   83  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1162
Error   84  error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1163
Error   85  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1163
Error   86  error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1163
Error   87  error C2146: syntax error : missing ';' before identifier 'glClearAccum'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1163
Error   88  error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1163
Error   89  error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1163
Error   90  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1163
Error   91  error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1164
Error   92  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1164
Error   93  error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1164
Error   94  error C2146: syntax error : missing ';' before identifier 'glClearColor'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1164
Error   95  error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1164
Error   96  error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1164
Error   97  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1164
Error   98  error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1165
Error   99  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1165
Error   100 error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1165
Error   101 error C2146: syntax error : missing ';' before identifier 'glClearDepth'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1165
Error   102 error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1165
Error   103 error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1165
Error   104 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1165
Error   105 error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1166
Error   106 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1166
Error   107 error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1166
Error   108 error C2146: syntax error : missing ';' before identifier 'glClearIndex'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1166
Error   109 error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1166
Error   110 error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1166
Error   111 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1166
Error   112 error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1167
Error   113 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1167
Error   114 error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1167
Error   115 error C2146: syntax error : missing ';' before identifier 'glClearStencil'  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1167
Error   116 error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1167
Error   117 error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1167
Error   118 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1167
Error   119 error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1168
Error   120 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1168
Error   121 error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1168
Error   122 error C2146: syntax error : missing ';' before identifier 'glClipPlane' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1168
Error   123 error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1168
Error   124 error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1168
Error   125 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1168
Error   126 error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1169
Error   127 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1169
Error   128 error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1169
Error   129 error C2146: syntax error : missing ';' before identifier 'glColor3b'   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1169
Error   130 error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1169
Error   131 error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1169
Error   132 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1169
Error   133 error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1170
Error   134 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1170
Error   135 error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1170
Error   136 error C2146: syntax error : missing ';' before identifier 'glColor3bv'  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1170
Error   137 error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1170
Error   138 error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1170
Error   139 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1170
Error   140 error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1171
Error   141 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1171
Error   142 error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1171
Error   143 error C2146: syntax error : missing ';' before identifier 'glColor3d'   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1171
Error   144 error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1171
Error   145 error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1171
Error   146 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1171
Error   147 error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1172
Error   148 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1172
Error   149 error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1172
Error   150 error C2146: syntax error : missing ';' before identifier 'glColor3dv'  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1172
Error   151 error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1172
Error   152 error C1003: error count exceeds 100; stopping compilation  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1172

请注意,当我使用 CEGUI 而不使用 FreeImage 时,它​​编译没有任何问题。没有 CEGUI 的 FreeImage 也是如此。但是当我想同时使用这两个库(FreeImage 和 CEGUI)时,问题就来了。

最佳答案

windows.h 包含在 gl.h 之后时,这些错误通常出现在 Windows 中。

确保在包含 gl.h 或任何其他可能间接包含 gl.h 的文件之前包含 windows.h

MSDN 所述,这是 OpenGL 工作所必需的。

关于c++ - FreeImage 不能与 CEGUI 一起工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9163284/

相关文章:

c - 正交相机投影矩阵

c++ - 在 OpenGL 中渲染 QWidget

c++ - 使用 C 而不是 C++ 编译头文件

c++ - 从另一个库的函数返回 char*

c++ - 是否可以交换结构数组(线性时间)?

linux - 制作安装和环境变量

c++ - error : expected constructor, destructor,或者 ‘;’ token CEGUI之前的类型转换

c++ - usleep 是否创建线程取消点?

java - 为什么我的 OpenGL 显示器上的背景颜色不会改变?

opengl - OpenGL-在屏幕上绘制像素?