:: Quên mật khẩu ::

Share | 

 

 minh su dung glut nhung gap loi

Xem chủ đề cũ hơn Xem chủ đề mới hơn Go down 
Sat Mar 12, 2011 7:13 pm

Userbiencute Người này hiện đang:
Level: Ma Mới
Danh vọng:18


Ma Mới

biencute

Ma Mới

Giới tính : Nữ
Đến từ : tphcm
Join : 08/11/2010
Bài gửi : 18
HUMOR : vui ve,thich chuyen cuoi

Thú cưng
.:

Bài gửiTiêu đề: minh su dung glut nhung gap loi

 
minh su dung glut de viet mot chuong trinh nhung no gap loi .Ban nao biet chi giup minh
code
#include
#include
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(0.5,0.7,1.0);
glBegin(GL_POLYGON);
glVertax3f(0.25,0.25,0.0);
glColor3f(0.9,1.0,0.4);
glVertex3f(0.75,0.25,0.0);
glColor3f(1.0,0.0,0.0);
glVertex(0.25,0.75,1.0);
glEnd();
glFlush();
}
void init(void)
{
glClearColor(1.0,1.0,1.0,0.2);
glMatrixMode(GL_PROJECTION);
glLoadIdentify();
glOrtho(0.0,1.0,0.0,1.0,1.0,3.0);
}
int main(int argc,char*argv[])
{
glutInit(&argc,argv);
glutInitDisplayMode(Glut_Sigle|Glut.RGB);
glutInitWindowSize(350,350);
glutIntiWindowPosition(100,100);
}
mình xài c++2008
lỗi
1>------ Build started: Project: thu1, Configuration: Debug Win32 ------
1>Compiling...
1>thu1.cpp
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : error C2146: syntax error : missing ';' before identifier 'glAccum'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1153) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1153) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1153) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1153) : error C2146: syntax error : missing ';' before identifier 'glAlphaFunc'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1153) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1153) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1153) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1154) : error C2146: syntax error : missing ';' before identifier 'GLboolean'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1154) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1154) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1154) : error C2146: syntax error : missing ';' before identifier 'glAreTexturesResident'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1154) : error C2371: 'APIENTRY' : redefinition; different basic types
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1154) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1155) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1155) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1155) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1155) : error C2146: syntax error : missing ';' before identifier 'glArrayElement'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1155) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1155) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1155) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1156) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1156) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1156) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1156) : error C2146: syntax error : missing ';' before identifier 'glBegin'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1156) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1156) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1156) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1157) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1157) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1157) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1157) : error C2146: syntax error : missing ';' before identifier 'glBindTexture'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1157) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1157) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1157) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1158) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1158) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1158) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1158) : error C2146: syntax error : missing ';' before identifier 'glBitmap'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1158) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1158) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1158) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1159) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1159) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1159) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1159) : error C2146: syntax error : missing ';' before identifier 'glBlendFunc'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1159) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1159) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1159) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1160) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1160) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1160) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1160) : error C2146: syntax error : missing ';' before identifier 'glCallList'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1160) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1160) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1160) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1161) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1161) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1161) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1161) : error C2146: syntax error : missing ';' before identifier 'glCallLists'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1161) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1161) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1161) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1162) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1162) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1162) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1162) : error C2146: syntax error : missing ';' before identifier 'glClear'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1162) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1162) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1162) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1163) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1163) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1163) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1163) : error C2146: syntax error : missing ';' before identifier 'glClearAccum'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1163) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1163) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1163) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1164) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1164) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1164) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1164) : error C2146: syntax error : missing ';' before identifier 'glClearColor'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1164) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1164) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1164) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1165) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1165) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1165) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1165) : error C2146: syntax error : missing ';' before identifier 'glClearDepth'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1165) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1165) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1165) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1166) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1166) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1166) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1166) : error C2146: syntax error : missing ';' before identifier 'glClearIndex'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1166) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1166) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1166) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1167) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1167) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1167) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1167) : error C2146: syntax error : missing ';' before identifier 'glClearStencil'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1167) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1167) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1167) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1168) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1168) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1168) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1168) : error C2146: syntax error : missing ';' before identifier 'glClipPlane'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1168) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1168) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1168) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1169) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1169) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1169) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1169) : error C2146: syntax error : missing ';' before identifier 'glColor3b'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1169) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1169) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1169) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1170) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1170) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1170) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1170) : error C2146: syntax error : missing ';' before identifier 'glColor3bv'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1170) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1170) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1170) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1171) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1171) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1171) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1171) : error C2146: syntax error : missing ';' before identifier 'glColor3d'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1171) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1171) : error C2086: 'int APIENTRY' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1171) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1172) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1172) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1172) : error C2086: 'int WINGDIAPI' : redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1172) : error C2146: syntax error : missing ';' before identifier 'glColor3dv'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1172) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\gl\gl.h(1172) : fatal error C1003: error count exceeds 100; stopping compilation
1>Build log was saved at "file://c:\Users\baongoc\Documents\Visual Studio 2008\Projects\thu1\thu1\Debug\BuildLog.htm"
1>thu1 - 143 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



Sat Mar 12, 2011 10:43 pm

UserRegulus™ Người này hiện đang:
Level: Tổng điều hành
Danh vọng:758


Tổng điều hành

Regulus™

Tổng điều hành

http://itk35.tk
Giới tính : Nam
Đến từ : ...
Join : 06/11/2009
Bài gửi : 758
HUMOR : Nghe nhạc.. Computer

Thú cưng
.:

Bài gửiTiêu đề: Re: minh su dung glut nhung gap loi

 
Code:

#include <glut.h>
void display(void)
{
   glClear(GL_COLOR_BUFFER_BIT);
   glColor3f(0.5,0.7,1.0);
   glBegin(GL_POLYGON);
   glVertex3f(0.25,0.25,0.0);
   glColor3f(0.9,1.0,0.4);
   glVertex3f(0.75,0.25,0.0);
   glColor3f(1.0,0.0,0.0);
   glVertex3f(0.25,0.75,1.0);
   glEnd();
   glFlush();
}
void init(void)
{
   glClearColor(1.0,1.0,1.0,0.2);
   glMatrixMode(GL_PROJECTION);

   glOrtho(0.0,1.0,0.0,1.0,1.0,3.0);
}


void main(int argc, char **argv)
{
   glutInit(&argc, argv);
   glutInitDisplayMode(GLUT_DEPTH | GLUT_SINGLE | GLUT_RGB);
   glutInitWindowPosition(100,100);
   glutInitWindowSize(320,320);
   glutCreateWindow("Test!!!!");
   glutDisplayFunc(display);
   glutMainLoop();
}

Phần lớn do sai lỗi chính tả...
bạn nên cài thêm Visual AssistX để nhắc lệnh giảm bớt lỗi




[center]
&lt;font size=10&gt;Tin học là phải tin mới học&lt;/font size&gt;

Copy- Paste -&gt; Copy- Paste-Hiểu-Đánh giá-Phát triển Cải tiến.
&lt;br&gt;


Email: plkhanhhai1991@gmail.com
k35104017@student.hcmup.edu.vn


Sun Mar 13, 2011 8:36 pm

Userbiencute Người này hiện đang:
Level: Ma Mới
Danh vọng:18


Ma Mới

biencute

Ma Mới

Giới tính : Nữ
Đến từ : tphcm
Join : 08/11/2010
Bài gửi : 18
HUMOR : vui ve,thich chuyen cuoi

Thú cưng
.:

Bài gửiTiêu đề: haiz loi khi debug chuong trinh c++

 
mình xài thử glut nhưng khi mình debug chương trình thì chương trình lại báo lỗi sai ở thư viện.Minh co thu code cua ban Regulus nhung van bi bao loi sai o thu vien .Ban nao biet sai o dau va sua nhu the nao thi giup minh
code
#include
#include
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(0.5,0.7,1.0);
glBegin(GL_POLYGON);
glVertex3f(0.25,0.25,0.0);
glColor3f(0.9,1.0,0.4);
glVertex3f(0.75,0.25,0.0);
glColor3f(1.0,0.0,0.0);
glVertex3f(0.25,0.75,1.0);
glEnd();
glFlush();
}
void init(void)
{
glClearColor(1.0,1.0,1.0,0.2);
glMatrixMode(GL_PROJECTION);

glOrtho(0.0,1.0,0.0,1.0,1.0,3.0);
}


void main(int argc, char **argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DEPTH | GLUT_SINGLE | GLUT_RGB);
glutInitWindowPosition(100,100);
glutInitWindowSize(320,320);
glutCreateWindow("Test!!!!");
glutDisplayFunc(display);
glutMainLoop();
}

loi
--------------------Configuration: ng - Win32 Debug--------------------
Compiling...
1.cpp
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2144: syntax error : missing ';' before type 'void'
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

1.obj - 3 error(s), 0 warning(s)

loi



Sun Mar 13, 2011 11:07 pm

UserRegulus™ Người này hiện đang:
Level: Tổng điều hành
Danh vọng:758


Tổng điều hành

Regulus™

Tổng điều hành

http://itk35.tk
Giới tính : Nam
Đến từ : ...
Join : 06/11/2009
Bài gửi : 758
HUMOR : Nghe nhạc.. Computer

Thú cưng
.:

Bài gửiTiêu đề: Re: minh su dung glut nhung gap loi

 
bạn có thể xem lại cách cài đặt GLUT trong http://itk35portal.tk/
các phiên bản GLUT sau này ko còn file gl.h nữa...
chỉ cần #include


Nếu bạn sử dụng VC 2008. nếu bạn copy như hướng dẫn vẫn ko dùng dc
thì hãy copy vào program file\Microsoft SDK\...




[center]
&lt;font size=10&gt;Tin học là phải tin mới học&lt;/font size&gt;

Copy- Paste -&gt; Copy- Paste-Hiểu-Đánh giá-Phát triển Cải tiến.
&lt;br&gt;


Email: plkhanhhai1991@gmail.com
k35104017@student.hcmup.edu.vn


Mon Mar 14, 2011 9:26 am

Userkim_o Người này hiện đang:
Level: Thành Viên Xây Dựng
Danh vọng:148


Thành Viên Xây Dựng

kim_o

Thành Viên Xây Dựng

Giới tính : Nam
Đến từ : An Giang
Join : 12/11/2009
Bài gửi : 148

Bài gửiTiêu đề: Re: minh su dung glut nhung gap loi

 
Thêm một cái lỗi naz...^^... "Unhandled exeption in BT.exe (GLUT32.DLL): 0xC0000005: Access Violation".



Mon Mar 14, 2011 10:26 am

UserRegulus™ Người này hiện đang:
Level: Tổng điều hành
Danh vọng:758


Tổng điều hành

Regulus™

Tổng điều hành

http://itk35.tk
Giới tính : Nam
Đến từ : ...
Join : 06/11/2009
Bài gửi : 758
HUMOR : Nghe nhạc.. Computer

Thú cưng
.:

Bài gửiTiêu đề: Re: minh su dung glut nhung gap loi

 
nếu bạn ko thể chạy dc chương trình GLUT thì có thể việc copy bị sai hoặc lỗi chương trình, bạn tiến hành copy lại hoặc xóa thư mục debug của project đagng làm..




[center]
&lt;font size=10&gt;Tin học là phải tin mới học&lt;/font size&gt;

Copy- Paste -&gt; Copy- Paste-Hiểu-Đánh giá-Phát triển Cải tiến.
&lt;br&gt;


Email: plkhanhhai1991@gmail.com
k35104017@student.hcmup.edu.vn


Today at 6:18 am

UserSponsored content Người này hiện đang:
Level:
Danh vọng:



Sponsored content

Bài gửiTiêu đề: Re: minh su dung glut nhung gap loi

 


 

minh su dung glut nhung gap loi

Xem chủ đề cũ hơn Xem chủ đề mới hơn Về Đầu Trang 
Trang 1 trong tổng số 1 trang

Permissions in this forum:Bạn không có quyền trả lời bài viết
ITK35Zone :: Hỏi Đáp, Góp ý-
 
Free forum | © phpBB | Free forum support | Liên hệ | Report an abuse | Create your own blog