I am a beginner for opengl and visual studio. I am using VS2010 and I met several problems when setting up opengl. I downloaded the NVDIA SDK so I have the gl.h and other header files under include directory. I downloaded glut and put glut32.dll in the same directory as my source file. It does not work if I put glut32.dll under system32. I can see the file using explorer but it is not visible for other applications including VS2010. I also put the lib files to the right windows SDK folder and added the linkers glut32.lib glu32.lib opengl32.lib to my project. I found this code online http://uowteaminvincible.wordpress.com/2010/06/23/getting-started-with-opengl-and-glut-in-microsoft-visual-studio-2008-in-windows-vista/
it does not give me anything but a write window(even I uncommented some functions in the end)
Also there is a lot of errors(but can be compiled and run)
Please help. Thank you!
1 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1152 1
2 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1152 11
3 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1153 1
4 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1153 11
5 IntelliSense: variable "WINGDIAPI" is not a type name c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1154 1
6 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1154 21
7 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1155 1
8 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1155 11
9 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1156 1
10 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1156 11
11 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1157 1
12 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1157 11
13 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1158 1
14 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1158 11
15 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1159 1
16 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1159 开发者_运维百科 11
17 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1160 1
18 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1160 11
19 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1161 1
20 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1161 11
21 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1162 1
22 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1162 11
23 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1163 1
24 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1163 11
25 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1164 1
26 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1164 11
27 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1165 1
28 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1165 11
29 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1166 1
30 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1166 11
31 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1167 1
32 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1167 11
33 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1168 1
34 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1168 11
35 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1169 1
36 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1169 11
37 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1170 1
38 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1170 11
39 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1171 1
40 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1171 11
41 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1172 1
42 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1172 11
43 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1173 1
44 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1173 11
45 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1174 1
46 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1174 11
47 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1175 1
48 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1175 11
49 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1176 1
50 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1176 11
51 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1177 1
52 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1177 11
53 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1178 1
54 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1178 11
55 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1179 1
56 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1179 11
57 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1180 1
58 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1180 11
59 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1181 1
60 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1181 11
61 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1182 1
62 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1182 11
63 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1183 1
64 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1183 11
65 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1184 1
66 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1184 11
67 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1185 1
68 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1185 11
69 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1186 1
70 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1186 11
71 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1187 1
72 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1187 11
73 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1188 1
74 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1188 11
75 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1189 1
76 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1189 11
77 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1190 1
78 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1190 11
79 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1191 1
80 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1191 11
81 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1192 1
82 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1192 11
83 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1193 1
84 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1193 11
85 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1194 1
86 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1194 11
87 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1195 1
88 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1195 11
89 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1196 1
90 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1196 11
91 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1197 1
92 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1197 11
93 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1198 1
94 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1198 11
95 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1199 1
96 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1199 11
97 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1200 1
98 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1200 11
99 IntelliSense: this declaration has no storage class or type specifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1201 1
100 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1201 11
Try including windows.h before gl.h
Also, see this Can't include <gl/gl.h>
精彩评论