a-t-e-f-e-h
دوشنبه 24 بهمن 1390, 11:51 صبح
سلام
تو سایت دانشجویان یه برنامه ی گرافیکی نوشته شده تو محیط ویژوال و با پسوند cpp
ولی توابع کتابخونه ای اون ارور میده
ارور هایی مثل:fatal error c1083: cannot open include file:'GL/glut.h':no such file or directory error
executing cl.exe
یا:fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
Error executing cl.exe
#include <windows.h> // use as needed for your system
#include <gl/Gl.h>
#include <gl/glut.h>
//<<<<<<<<<<<<<<<<<<<<<<< myInit >>>>>>>>>>>>>>>>>>>>
void myInit(void)
{
glClearColor(1.0,1.0,1.0,0.0); // set white background color
glColor3f(0.0f, 0.0f, 0.0f); // set the drawing color
glPointSize(4.0); // a ‘dot’ is 4 by 4 pixels
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0.0, 640.0, 0.0, 480.0);
}
//<<<<<<<<<<<<<<<<<<<<<<<< myDisplay >>>>>>>>>>>>>>>>>
void myDisplay(void)
{
glClear(GL_COLOR_BUFFER_BIT); // clear the screen
glBegin(GL_POINTS);
glVertex2i(100, 50); // draw three points
glVertex2i(100, 130);
glVertex2i(150, 130);
glEnd();
glFlush(); // send all output to display
}
//<<<<<<<<<<<<<<<<<<<<<<<< main >>>>>>>>>>>>>>>>>>>>>>
void main(int argc, char** argv)
{
glutInit(&argc, argv); // initialize the toolkit
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); // set display mode
glutInitWindowSize(640,480); // set window size
glutInitWindowPosition(100, 150); // set window position on screen
glutCreateWindow("my first attempt"); // open the screen window
glutDisplayFunc(myDisplay); // register redraw function
myInit();
glutMainLoop(); // go into a perpetual loop
{
اینو یکی از بچه های سایت دانشجویان نوشته که نمایش سه نقطه روی صفحه هست
میشه بگید چطور میشه error شو برطرف کرد؟
http://www.daneshju.ir/forum/f339/t27228.html
تو سایت دانشجویان یه برنامه ی گرافیکی نوشته شده تو محیط ویژوال و با پسوند cpp
ولی توابع کتابخونه ای اون ارور میده
ارور هایی مثل:fatal error c1083: cannot open include file:'GL/glut.h':no such file or directory error
executing cl.exe
یا:fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
Error executing cl.exe
#include <windows.h> // use as needed for your system
#include <gl/Gl.h>
#include <gl/glut.h>
//<<<<<<<<<<<<<<<<<<<<<<< myInit >>>>>>>>>>>>>>>>>>>>
void myInit(void)
{
glClearColor(1.0,1.0,1.0,0.0); // set white background color
glColor3f(0.0f, 0.0f, 0.0f); // set the drawing color
glPointSize(4.0); // a ‘dot’ is 4 by 4 pixels
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0.0, 640.0, 0.0, 480.0);
}
//<<<<<<<<<<<<<<<<<<<<<<<< myDisplay >>>>>>>>>>>>>>>>>
void myDisplay(void)
{
glClear(GL_COLOR_BUFFER_BIT); // clear the screen
glBegin(GL_POINTS);
glVertex2i(100, 50); // draw three points
glVertex2i(100, 130);
glVertex2i(150, 130);
glEnd();
glFlush(); // send all output to display
}
//<<<<<<<<<<<<<<<<<<<<<<<< main >>>>>>>>>>>>>>>>>>>>>>
void main(int argc, char** argv)
{
glutInit(&argc, argv); // initialize the toolkit
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); // set display mode
glutInitWindowSize(640,480); // set window size
glutInitWindowPosition(100, 150); // set window position on screen
glutCreateWindow("my first attempt"); // open the screen window
glutDisplayFunc(myDisplay); // register redraw function
myInit();
glutMainLoop(); // go into a perpetual loop
{
اینو یکی از بچه های سایت دانشجویان نوشته که نمایش سه نقطه روی صفحه هست
میشه بگید چطور میشه error شو برطرف کرد؟
http://www.daneshju.ir/forum/f339/t27228.html