Menu

Using Opengl with Dev C++

Anonymous
2002-11-13
2012-09-26
  • Anonymous

    Anonymous - 2002-11-13

    First of all Hi evryone! Newbie on Deck so please be patient with me if my questions seem a little dum.
    I have just entered into the programming world and am looking to develop my own games as I have been modeling and animating with 3d studio max 4.2 for quite some time now.
    Problem 1: I can't seem to link dev to the opengl lib files ie, opengl32.lib & glut32.lib

    Help please!!!!!!!!!

     
    • Trev L Nunes

      Trev L Nunes - 2002-11-16

      no problem:

      In your project linker options:

      -lopengl32 -lglu32 -lglut32

      Should do the trick, with the Directory settings pointing to the relevant location. Just as a note use the glutXXXX routines to initialize the window and display it makes it more portable. If you still have trouble just reply to this post describing the error messages.

       

       
    • Anonymous

      Anonymous - 2002-11-19

      i ve done that.
      but if i start the .exe i got the Messagebox :
      ... missing Export-GLUT32.DLL:__glutCreateMenuWithExit

      My System: Win 98

       
    • Trev L Nunes

      Trev L Nunes - 2002-11-20

      Hmmm dunno, I'm new to openGL too, I have trouble calling the same function in my code, but maybe you could rebuild the library interface:

      1) impdef glut32.dll > glut32.def
      2) dlltool --dllname glut32.dll --def glut32.def --output-lib glut32.a -k

      My GL init routine looks a little like this:

      main...

        glutInit(&argc, argv); 
        glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_ALPHA | GLUT_DEPTH); 
        glutInitWindowSize(800, 600); 
        glutInitWindowPosition(0, 0); 
        winId = glutCreateWindow("test"); 
        glutDisplayFunc(&glCallback);  // callback draw routine
        glutFullScreen();
        glutIdleFunc(&glCallback);
        glutReshapeFunc(&glResizeCallback);
        glutKeyboardFunc(&glKeyboardCallback);  // keyboard callback...
        InitGL(800, 600);
        glutMainLoop(); 

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.