locked
I am having this issue when I run my code in CPP it doesnt show the output it just crashes how to resolve this Can any one Help me!!!! RRS feed

  • Question

  • Code

    #include <stdio.h>
    #include <stdlib.h>
    #include <GL\glut.h>
    int GAngle=0;
    void Display(void)
    {
    glClear(GL_COLOR_BUFFER_BIT);
    glLoadIdentity();
    glRotated(GAngle,0,1,0);

    // Anti-Clockwise Winding

    glBegin(GL_TRIANGLES);
    glColor3f(1,0,0);
    glVertex3f(-1,0,0);
    glVertex3f(1,0,0);
    glVertex3f(0,1,0);
    glColor3f(0,1,0);
    glVertex3f(-1,0,0.5);
    glVertex3f(1,0,0.5);
    glVertex3f(0,1,0.5);
    glEnd();

    GAngle = GAngle + 4;

    glFlush();

    glutSwapBuffers();

    }

    void Timer(int extra)
    {
    glutPostRedisplay();
    glutTimerFunc(30,Timer,0);
    }

    int main(void)
    {
    // Init to double buffering

    glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB);
    glutCreateWindow("Dual Rotating Triangle");
    glutDisplayFunc(Display);
    glutTimerFunc(0,Timer,0);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    glFrustum(-1,1,-1,1,1,3);
    glTranslated(0,0,-2);
    glMatrixMode(GL_MODELVIEW);
    glutMainLoop();
    return 0;
    }

    Issue

    'Mini Project.exe': Loaded 'C:\Users\Director-HRD\Desktop\test\Mini Project\Debug\Mini Project.exe', Symbols loaded.
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Users\Director-HRD\Desktop\test\Mini Project\Mini Project\freeglut.dll', Binary was not built with debug information.
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\win32u.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\gdi32full.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\msvcp_win.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\ucrtbase.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\winmmbase.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Symbols loaded (source information stripped).
    'Mini Project.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Symbols loaded (source information stripped).
    The thread 'Win32 Thread' (0x2918) has exited with code 1 (0x1).
    The thread 'Win32 Thread' (0x39fc) has exited with code 1 (0x1).
    The thread 'Win32 Thread' (0x1f30) has exited with code 1 (0x1).
    The program '[10488] Mini Project.exe: Native' has exited with code 1 (0x1)


    Tuesday, April 7, 2020 12:08 AM

All replies


  • #include <stdio.h>
    #include <stdlib.h>
    #include <GL\glut.h>

    int main(void)
    {
    // Init to double buffering


    As the name of this forum indicates, it is for issues related to the 
    Visual Basic .NET programming language. You need to ask this in the C++
    forum: 

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vcgeneral

    - Wayne
     


    • Edited by WayneAKing Tuesday, April 7, 2020 12:54 AM
    Tuesday, April 7, 2020 12:54 AM
  • but this is a program on computer graphics.

    and the error is on Visual Studio 2010 ultimate 

    • Edited by VarunUK07 Tuesday, April 7, 2020 1:45 AM
    Tuesday, April 7, 2020 1:19 AM
  • but this is a program on computer graphics.

    So what? It is written in C (or C++), not Visual Basic, not C#, not F#, etc.
    All of these languages have facilities available to produce graphics.

    The code you posted would never compile using the Visual Basic compiler.

    We don't analyze C/C++ code in the forum for Visual Basic code.
    That's why your thread has been moved to the C++ forum.

    - Wayne

    Tuesday, April 7, 2020 1:46 AM
  • Hi,

    Thank you for posting here.

    >>I am having this issue when I run my code in CPP it doesnt show the output it just crashes how to resolve this Can any one Help me!!!!

    The message means that since you're running your program under a debugger, it tries to load symbols for each loaded DLL. 

    "Source information stripped" means source code information has been stripped away. The source information relates binary addresses to lines in source modules to allow source code debugging. As you don't have the source code for xxx.dll anyway, Microsoft has stripped this information from the .pdb data. And as far as I'm concerned that it's not related to your program "Mini Project.exe"'s exit.

    This forum is used to discuss and ask questions about the Visual C++ IDE, libraries, samples, tools, setup, and Windows programming using MFC and ATL.. According to your issue , I suggest you should ask it in the OpenGL forum for better support.

    Best Regards,

    Jeanine Zhang

    Tuesday, April 7, 2020 2:28 AM