Results 1 to 5 of 5

Thread: Open GL error while Complie

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2011
    Posts
    13

    Open GL error while Complie

    AS I writing code for OpenGL Program for BezerCurve with the help of Visual C++ as I am not able to compile this code so if any one having some solution and can guide me please help me..!





    #include <stdafx.h>

    #include <stdlib.h>
    #include <gl/glut.h>
    GLfloat ctrlpoints[4][3]={{-4.0,-4.0,0.0},
    {-2.0,4.0,0.0},
    {2.0,-4.0,0.0},
    {4.0,4.0,0.0}};
    void init(void)
    {
    glClearColor(0.0,0.0,0.0,0.0);
    glShadeModel(GL_FLAT);
    glMap1f(GL_MAP1_VERTEX_3,0.0,1.0,3,4,&amp;ctrlpoin ts[0][0]);
    glEnable(GL_MAP1_VERTEX_3);
    }
    void display(void)
    {
    int i;
    glClear(GL_COLOR_BUFFER_BIT);
    glColor3f(1.0,1.0,1.0);
    glBegin(GL_LINE_STRIP);
    for(i=0;i<=30;i++)
    glEvalCoord1f((GLfloat)i/30.0);
    glEnd();
    glPointSize(5.0);
    glColor3f(1.0,1.0,0.0);
    glBegin(GL_POINTS);
    for(i=0;i<4;i++)
    glVertex3fv(&amp;ctrlpoints[i][0]);
    glEnd();
    glFlush();
    }
    void keyboard(unsigned char key,int x, int y)
    {
    switch (key)
    {
    case 's':
    exit(0);
    break;
    default:
    break;
    }
    }
    void reshape(int w,int h)
    {
    glViewport(0,0,(GLsizei)w,(GLsizei)h);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    if(w <= h)
    glOrtho(-5.0,-5.0,-5.0*(GLfloat)h/(GLfloat)w,5.0*(GLfloat)h/(GLfloat)w,-5.0,5.0);
    else
    glOrtho(-5.0*(GLfloat)h/(GLfloat)w,5.0*(GLfloat)h/(GLfloat)w,-5.0,5.0,-5.0,5.0);
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
    }
    int main(int argc,char** argv)
    {
    glutInit(&amp;argc,argv);
    glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
    glutInitWindowSize(600,600);
    glutInitWindowPosition(100, 100);
    glutCreateWindow("Hai friends..............!");
    init();
    glutDisplayFunc(display);
    glutReshapeFunc(reshape);
    glutKeyboardFunc(keyboard);
    glutMainLoop();
    return 0;
    }


    1>------ Build started: Project: BezerCurve, Configuration: Release Win32 ------
    1>Compiling...
    1>BezerCurve.cpp
    1>Linking...
    1>Generating code
    1>Finished generating code
    1>Embedding manifest...
    1>mt.exe : general error c10100b1: Failed to load file "..\Release\BezerCurve.exe". The system cannot find the file specified.
    1>Build log was saved at "file://e:\Tutorials\OpenGLR&amp;D\BezerCurve\BezerCurve\B ezerCurve\Release\BuildLog.htm"
    1>BezerCurve - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Mar 2009
    Location
    Karachi, Pakistan
    Posts
    810

    Re: Open GL error while Complie

    Your source file is not placed where it should be placed.
    Regards,
    Mobeen

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2011
    Posts
    13

    Re: Open GL error while Complie

    ok can u give me better idea it will help me

  4. #4
    Senior Member Frequent Contributor
    Join Date
    Mar 2009
    Location
    Karachi, Pakistan
    Posts
    810

    Re: Open GL error while Complie

    Start with an empty ein32 console application. Right click on source files and then add existing option. Go to the place and pick the source file. Better copy the source file in the solution directory before hand and then pick it. Thats it. Shoudl work rightaway.
    Regards,
    Mobeen

  5. #5
    Senior Member Regular Contributor
    Join Date
    Oct 2010
    Location
    France
    Posts
    458

    Re: Open GL error while Complie

    1>mt.exe : general error c10100b1: Failed to load file "..\Release\BezerCurve.exe". The system cannot find the file specified.
    From what I see, this is not the source file that the program cannot find, this is the binary file, which looks more annoying.

    mt.exe might be the progam used to load binaries when compiled from multithreaded win32/64 binaries. Try to change the option to mtd or another one.

    Also, try to compile under debug mode instead of release, first.

Similar Threads

  1. Open Gl ES Error
    By tommohawkaction in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-07-2017, 03:20 AM
  2. Cannot assign to gl_Layer without complie error
    By tamato in forum OpenGL: GLSL
    Replies: 9
    Last Post: 05-06-2011, 06:50 AM
  3. glut installed won't complie
    By Fuzzy in forum OpenGL: macOS
    Replies: 4
    Last Post: 05-10-2008, 11:09 AM
  4. Replies: 0
    Last Post: 08-20-2002, 09:16 PM
  5. Open GL Error
    By phunq in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 01-14-2001, 07:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean