Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: need a good "glut.h" link ? :)

  1. #11
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: GLUT installation problem.../ need a good "glut.h" link ? :)

    hello all. hello matthew.

    Now I have installed code::blocks! (version 10.05)

    Yesterday evening I wanted to install a first openGL example (GLUT) and
    the setup wizard stopped with this error:

    ...after "please select GLUT location"

    I've typed path where I have installed Freeglut ( a) minGW 2.6.0.3 and b) freeglut 2.6.0) and GLUT 3.7.6.+

    bin files (unzipped). I tried to go both ways.

    then this script error message appears:

    "the path you entered seems valid, but the wizard can't locate the
    following glut's library file:
    glut32 in it. (Also tried prepending lib and appending .a and .lib)
    glut32.dll I have installed also *.lib and *.inc files.

    the file "glut32.lib " I cannot find in GLUT 3.7.6.+ zip file.

    freeglut folder content:
    "freeglut minGW 2.6.0.3 mp" folder content:

    1) include (folder) : GL Folder: with 4 freeglut header files

    2) lib (folder) : 2 files : libfreeglut + libfreeglut_static

    3) freeglut 2.6.0.0 dll

    4) 2 text files
    don't know why the setup stopped ;(
    any help would be good!

    thanks, frank
    Attached Images Attached Images
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  2. #12

    Re: need a good "glut.h" link ? :)

    Ok, I've attached a version of GLUT that I downloaded from here which has been specifically compiled with MinGW.

    I installed the MinGW compiler separately & have it located at C:\MinGW, I've got glut32.dll at C:\MinGW\bin, glut.h is at C:\MinGW\include\GL & libglut32.a is located at C:\MinGW\lib.

    Don't bother using the setup wizard, just create a new empty project, add an empty source file to the project & paste the code below into it.

    Then link with...
    -lglut32 -lglu32 -lopengl32
    [code=cpp]
    #include <stdlib.h>
    #include <GL/glut.h>

    void keyboard(unsigned char key, int x, int y);
    void display(void);


    int main(int argc, char** argv)
    {
    glutInit(&argc, argv);
    glutCreateWindow("GLUT Test");
    glutKeyboardFunc(&keyboard);
    glutDisplayFunc(&display);
    glutMainLoop();

    return EXIT_SUCCESS;
    }


    void keyboard(unsigned char key, int x, int y)
    {
    switch (key)
    {
    case '\x1B':
    exit(EXIT_SUCCESS);
    break;
    }
    }


    void display()
    {
    glClear(GL_COLOR_BUFFER_BIT);

    glColor3f(1.0f, 0.0f, 0.0f);

    glBegin(GL_POLYGON);
    glVertex2f(-0.5f, -0.5f);
    glVertex2f( 0.5f, -0.5f);
    glVertex2f( 0.5f, 0.5f);
    glVertex2f(-0.5f, 0.5f);
    glEnd();

    glFlush();
    }
    [/code]
    Attached Files Attached Files
    Operating System: Windows 10 Home 64-bit
    CPU: Intel Celeron N4000 CPU @ 1.10GHz
    Memory: 4.00GB RAM
    Graphics: Intel UHD Graphics 600

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Forum: added "Auto Youtube Link-Converter" plugin
    By ErosOlmi in forum Web and Forum
    Replies: 0
    Last Post: 07-05-2011, 12:47
  2. gui: xpbutton good for ("UIAdv")
    By Lionheart008 in forum UI (User Interface)
    Replies: 6
    Last Post: 08-12-2009, 18:35

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •