JBTALKS.CC

标题: Microsoft Visual C++ [打印本页]

作者: hsym    时间: 2010-8-16 12:44 PM
标题: Microsoft Visual C++
为什么不能 run 以下的 coding??
我用 Microsoft Visual C++ 2008。。
谁能帮我。。。


/* ex4.c */
#include <GL/glut.h>
void display (void)  {
/* Called when OpenGL needs to update the display */
     glClear (GL_COLOR_BUFFER_BIT); /* Clear the window */
     glLoadIdentity ();
     gluLookAt (0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);

     glBegin (GL_LINE_LOOP); /* Draw a triangle */
     glVertex3f(-0.3, -0.3, 0.0);
     glVertex3f(0.0, 0.3, 0.0);
     glVertex3f(0.3, -0.3, 0.0);
     glEnd ();
     glFlush (); /* Force update of screen */
}

void keyboard  (unsigned char key, int x, int y)  {
/* Called when a key is pressed */
     if (key == 27) exit (0); /* 27 is the Escape key */
}

void reshape  (int width, int height)
{ /* Called when the window is created,  moved or resized */
          glViewport  (0, 0, (GLsizei) width, (GLsizei) height);
          glMatrixMode (GL_PROJECTION); /* Select the projection matrix */
          glLoadIdentity (); /*Initialise it */
          glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); /* The unit cube */
          glMatrixMode (GL_MODELVIEW); / Select the modelview matrix */
}

int main (int argc, char **argv)  {
     glutInit (&argc, argv); /* Initialise OpenGL */
     glutInitWindowSize (500, 500); /* Set the window size */
     glutInitWindowPosition (100, 100); /* Set the window position */
     glutCreateWindow (“ex4”); /* Create the window */
     glutDisplayFunc (display); /* Register the “display” function */
     glutReshapeFunc (reshape); /* Register the “reshape” function */
     glutKeyboardFunc (keyboard); /* Register the “keyboard” function */
     glutMainLoop (); /*  Enter the OpenGL main loop */
     return 0;         
}
/*end of ex4.c */
作者: hsym    时间: 2010-8-16 12:50 PM
\Debug\code.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.

出现以上的 ERROR。。
作者: shippo    时间: 2010-8-17 10:38 PM
没用过openGL...
不过如果是manifest problem 的话通常先做以下步骤:

clean 然后rebuild
solution name 改短。。
project->properties,link->manifest turn off
最后在不行的话,recreate new project,然后把code copy过来build.
作者: calvenyow    时间: 2010-9-12 10:47 PM
很复杂,看不明




欢迎光临 JBTALKS.CC (https://jbtalks.my/) Powered by Discuz! X2.5