Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Windows XP, Visual Studio .NET and GLUT (OpenGL)

  1. #1
    Junior Member Newbie
    Join Date
    May 2002
    Posts
    9

    Windows XP, Visual Studio .NET and GLUT (OpenGL)


    Is there a way to recompile the GLUT Libraries to be used with Windows XP and Visual Studio .NET? Does anyone have the glut.lib, glut32.lib, glut.dll, glut32.dll and glut.h working with Visual Studio .NET and Windows XP?

  2. #2
    Senior Member OpenGL Guru Humus's Avatar
    Join Date
    Mar 2000
    Location
    Stockholm, Sweden
    Posts
    2,444

    Re: Windows XP, Visual Studio .NET and GLUT (OpenGL)

    It should work as it is without recompilation. I don't use glut myself, but haven't had any problems running glut apps on WinXP or compiling them with MSVC.NET

  3. #3
    Junior Member Newbie
    Join Date
    May 2002
    Posts
    9

    Re: Windows XP, Visual Studio .NET and GLUT (OpenGL)

    Running already compiled glut apps are fine. Writing and compiling new glut apps are not.

    Originally posted by Humus:
    It should work as it is without recompilation. I don't use glut myself, but haven't had any problems running glut apps on WinXP or compiling them with MSVC.NET

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Feb 2001
    Location
    Switzerland
    Posts
    1,840

    Re: Windows XP, Visual Studio .NET and GLUT (OpenGL)

    normally you can use the same libs and headers and dlls as always before, where is the problem you get?
    http://davepermen.net - if i could stay true to my heart, i would feel totally free

  5. #5
    Junior Member Newbie
    Join Date
    May 2002
    Posts
    9

    Re: Windows XP, Visual Studio .NET and GLUT (OpenGL)

    First I get this message,

    cube.cpp(134): fatal error C1010: unexpected end of file while

    looking for precompiled header directive

    So I set the Create/Use Precompile Header to Not Using Precompile Header under Page

    Properties.

    Then I get these message,


    TestCubeProject error LNK2019: unresolved external symbol __imp__glEnd@0 referenced in

    function "void __cdecl polygon(int,int,int,int)" (?polygon@@YAXHHHH@Z)
    TestCubeProject error LNK2019: unresolved external symbol __imp__glVertex3fv@4 referenced in

    function "void __cdecl polygon(int,int,int,int)" (?polygon@@YAXHHHH@Z)
    TestCubeProject error LNK2019: unresolved external symbol __imp__glNormal3fv@4 referenced in

    function "void __cdecl polygon(int,int,int,int)" (?polygon@@YAXHHHH@Z)
    TestCubeProject error LNK2019: unresolved external symbol __imp__glColor3fv@4 referenced in

    function "void __cdecl polygon(int,int,int,int)" (?polygon@@YAXHHHH@Z)
    TestCubeProject error LNK2019: unresolved external symbol __imp__glBegin@4 referenced in

    function "void __cdecl polygon(int,int,int,int)" (?polygon@@YAXHHHH@Z)
    TestCubeProject error LNK2019: unresolved external symbol _glutSwapBuffers@0 referenced in

    function "void __cdecl display(void)" (?display@@YAXXZ)
    TestCubeProject error LNK2019: unresolved external symbol __imp__glFlush@0 referenced in

    function "void __cdecl display(void)" (?display@@YAXXZ)
    TestCubeProject error LNK2019: unresolved external symbol __imp__glRotatef@16 referenced in

    function "void __cdecl display(void)" (?display@@YAXXZ)
    TestCubeProject error LNK2019: unresolved external symbol __imp__glLoadIdentity@0 referenced

    in function "void __cdecl display(void)" (?display@@YAXXZ)
    TestCubeProject error LNK2019: unresolved external symbol __imp__glClear@4 referenced in

    function "void __cdecl display(void)" (?display@@YAXXZ)
    TestCubeProject error LNK2019: unresolved external symbol _glutPostRedisplay@0 referenced in

    function "void __cdecl spinCube(void)" (?spinCube@@YAXXZ)
    TestCubeProject error LNK2019: unresolved external symbol __imp__glOrtho@48 referenced in

    function "void __cdecl myReshape(int,int)" (?myReshape@@YAXHH@Z)
    TestCubeProject error LNK2019: unresolved external symbol __imp__glMatrixMode@4 referenced

    in function "void __cdecl myReshape(int,int)" (?myReshape@@YAXHH@Z)
    TestCubeProject error LNK2019: unresolved external symbol __imp__glViewport@16 referenced in

    function "void __cdecl myReshape(int,int)" (?myReshape@@YAXHH@Z)
    TestCubeProject error LNK2019: unresolved external symbol _glutMainLoop@0 referenced in

    function _main
    TestCubeProject error LNK2019: unresolved external symbol __imp__glEnable@4 referenced in

    function _main
    TestCubeProject error LNK2019: unresolved external symbol _glutMouseFunc@4 referenced in

    function _main
    TestCubeProject error LNK2019: unresolved external symbol _glutIdleFunc@4 referenced in

    function _main
    TestCubeProject error LNK2019: unresolved external symbol _glutDisplayFunc@4 referenced in

    function _main
    TestCubeProject error LNK2019: unresolved external symbol _glutReshapeFunc@4 referenced in

    function _main
    TestCubeProject error LNK2019: unresolved external symbol _glutCreateWindow@4 referenced in

    function _main
    TestCubeProject error LNK2019: unresolved external symbol _glutInitWindowSize@8 referenced

    in function _main
    TestCubeProject error LNK2019: unresolved external symbol _glutInitDisplayMode@4 referenced

    in function _main
    TestCubeProject error LNK2019: unresolved external symbol _glutInit@8 referenced in function

    _main
    TestCubeProject fatal error LNK1120: 24 unresolved externals

    So I add:

    #pragma comment (lib, "opengl32.lib")
    #pragma comment (lib, "glu32.lib")
    #pragma comment (lib, "glut32.lib")

    in front of the #include statements.
    it compiles successfully. But only brings up a blank windows.

    All this using VS.NET to create a MFC.

    Originally posted by davepermen:
    normally you can use the same libs and headers and dlls as always before, where is the problem you get?


    [This message has been edited by VS.NET-XP (edited 05-31-2002).]

  6. #6
    Member Regular Contributor
    Join Date
    Jun 2000
    Location
    Karlsruhe, Germany
    Posts
    486

    Re: Windows XP, Visual Studio .NET and GLUT (OpenGL)

    hey! how bout linking with opengl32.lib and glut32.lib?????

    -Lev

  7. #7
    Junior Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Vancouver
    Posts
    110

    Re: Windows XP, Visual Studio .NET and GLUT (OpenGL)

    Originally posted by Lev:
    hey! how bout linking with opengl32.lib and glut32.lib?????

    -Lev
    That's what the pragma statements at the bottom of the poster's error description are for.

    He indicates that it now compiles, but does not produce graphics output.

    VS.NET-XP person: I am not familiar with .NET, but you mention creating an MFC application at the end of your post. Try creating a win32 console application instead.

    I'm kinda confused about your having had to pragma the libs in your app - the glut header normally does that for you. Perhaps you've got an old glut distribution?

    -- Jeff

  8. #8
    Junior Member Newbie
    Join Date
    May 2001
    Location
    Belgium
    Posts
    5

    Re: Windows XP, Visual Studio .NET and GLUT (OpenGL)

    hmmmz I got the same problem here with the nvidia SDK

  9. #9
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,797

    Re: Windows XP, Visual Studio .NET and GLUT (OpenGL)

    As I mentioned in the beginner's form about this same topic, I was able to compile a glut app in .Net by using the VC6 headers and libraries with no problems. So far as him not getting any screen output, it is probably one of the many problems that plague beginners like not setting up the projection or modelview matrices correctly.

    [This message has been edited by Deiussum (edited 05-31-2002).]
    Deiussum
    Software Engineer and OpenGL enthusiast

  10. #10
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,797

    Re: Windows XP, Visual Studio .NET and GLUT (OpenGL)

    Just noticed the comment about MFC... I'm confused now. Are you using MFC to create your window or glutCreateWindow? If you're using MFC to create the window, you'll need to use ChoosePixelFormat, DescribePixelFormat, and SetPixelFormat in order to enable OpenGL. If you're using glutCreateWindow, recreate your project as a Win32 console app and try again...
    Deiussum
    Software Engineer and OpenGL enthusiast

Posting Permissions

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