Results 1 to 5 of 5

Thread: OpenGL and GLUT primer (a little bit frustrated)

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2002
    Location
    Istanbul, Turkey
    Posts
    5

    OpenGL and GLUT primer (a little bit frustrated)

    Hi,

    I'm new to OpenGL and GLUT programming.

    I thingk I've got trouble not with OpenGL but with GLUT on Windows2000 Professional. I think so because when I download and try to run the compiled versions of GLUT examples from:
    http://www.opengl.org/developers/cod.../examples.html

    My system tells me that "The dynamic link library glut.dll cannot be found in the specified path: C:\WINNT\System32; ...."

    I also looked at a site:
    http://aslan.wheatonma.edu/~nbuggia/...enGL_vcpp.html

    Telling me that I need:

    glut.dll
    glut.h
    glut.lib
    glut32.dll
    glut32.lib

    However when I download glut-3.7.6-bin.zip from:
    http://www.xmission.com/~nate/glut.html

    All I get is:

    glut.def
    glut.h
    glut32.dll
    glut32.lib
    README-win32.txt

    nothing like glut.dll or glut.lib. So I cannot run the programs and also when I try to compile them with Visual C++ (VC7, Visual Studio.NET) they compile OK but when I try to build the program it says that:

    fatal error LNK1120: 1 unresolved externals
    error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartUp

    You can see the source code at:
    http://www.opengl.org/developers/cod...xamples/cube.c

    I hope if somebody can help me because I'm just stuck at this point and just cannot try any examples.

  2. #2
    Junior Member Newbie
    Join Date
    Jul 2002
    Location
    Istanbul, Turkey
    Posts
    5

    Re: OpenGL and GLUT primer (a little bit frustrated)

    Well, I solved my problem even though I'm not sure how I exactly did that.

    I've just created a new and empty (!) Win32 Console Application in Visual Studio.NET (Visual C++) pasted the same OpenGL/GLUT code, compiled and built it without any problems! The resultin .exe file ran smoothly without any problems.

    Thanks to everyone who spent their times for trying to find out what my problem was in the previous message (still seems a mystery to me).

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: OpenGL and GLUT primer (a little bit frustrated)

    There are two types of executable projects; Console Application and Application. Application uses a WinMain as entry point in your program, and Console Application uses a main as entry point. Depending on which of these function your code has, main or WinMain, you should create the correct type of project.

    So there's nothing mysterious about it, just some lack of knowledge about your compiler

  4. #4
    Junior Member Newbie
    Join Date
    Jul 2002
    Location
    Istanbul, Turkey
    Posts
    5

    Re: OpenGL and GLUT primer (a little bit frustrated)

    Originally posted by Bob:
    There are two types of executable projects; Console Application and Application. Application uses a WinMain as entry point in your program, and Console Application uses a main as entry point. Depending on which of these function your code has, main or WinMain, you should create the correct type of project.

    So there's nothing mysterious about it, just some lack of knowledge about your compiler

    Well, in my problematic trial the system was trying to produce a Console App, however I should've missed something so that it didn't work, but when I started a new project, made it an EMPTY Console App it compiled and ran smoothly.

    For my knowledge about the compiler, you're definitely right. The last time I've done C/C++ coding the mainstream compiler was Turbo C++

    Thanks for your comments.

  5. #5
    Junior Member Newbie
    Join Date
    Jul 2002
    Location
    Istanbul, Turkey
    Posts
    5

    Re: OpenGL and GLUT primer (a little bit frustrated)

    One thing has drawn my attention about GLUT:

    If glut.h includes gl.h then why do so many examples start with:

    #include <GL/gl.h>
    #include <GL/glut.h>

    and cause the poor compiler trouble with "redefined" stuff?

    Is there some deeper reason? Is it different in Linux/UNIX environment? In my Win2000 environment and VC++ I just inclued the glut.h and everything works fine.

Similar Threads

  1. Frustrated with simple problem, please help!
    By gennoveus in forum OpenGL: Windows
    Replies: 12
    Last Post: 09-19-2011, 04:12 AM
  2. OpenGL matrix primer?
    By NeuroFuzzy in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-06-2011, 07:50 PM
  3. OpenGL: A Primer (2002) pg 150
    By wmspringer in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-12-2004, 07:51 AM
  4. Primer on 3D Programming
    By songohan in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 08-10-2001, 10:07 AM
  5. 3D Hardware "primer"
    By in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 02-28-2001, 07:41 AM

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