Thread: opengl? "stdafx.h"??

  1. #16
    essence of digital xddxogm3's Avatar
    Join Date
    Sep 2003
    Posts
    589
    i'm trying a new opengl project, but I'm getting the same issue.
    opengl_test fatal error LNK1104: cannot open file 'opengl32.dll'

    Code:
     
    #include<windows.h>
    #include<conio.h>
    #include<gl/gl.h>
    #include<gl/glaux.h>
    
    void main()
    {
    auxInitDisplayMode(AUX_SINGLE|AUX_RGBA);
    auxInitPosition(100,100,250,250);
    auxInitWindow("Work Sucks");
    
    glClearColor(0.0f,0.0f,1.0f,0.0f);
    glClear(GL_COLOR_BUFFER_BIT);
    glFlush();
    
    cprintf("program is completed\n");
    getch();
    }
    I'm using this code from the opengl Bible.

    I used the prior suggestion in this, but it doesn't work.
    On VC++ .NET, do the following:

    Go to the solution explorer (the pane that has all your source files listed; use View->Solution Explorer if you don't see it).

    You should see a tree view with your solution. The root of the tree is the solution, and the thing directly under the solution is your project (typically, if your solution contains only one project, it will have the same name as the solution itself).

    Right click on the project, and select the "Properties" option from the menu that pops up.

    In the new window that appears, click on "linker" then "input". Make sure, at the top, you select Configuration: All Configurations. Add your libraries (separated with spaces if there are multiple libraries) to the box saying "Additional Dependencies"
    I have also checked to make sure opengl32.dll was located in my system/win32 folder, and it is there?
    I'm confused.
    Am I writing the code incorrectly?
    Last edited by xviddivxoggmp3; 12-16-2003 at 12:43 AM.
    "Hence to fight and conquer in all your battles is not supreme excellence;
    supreme excellence consists in breaking the enemy's resistance without fighting."
    Art of War Sun Tzu

  2. #17
    Registered User
    Join Date
    May 2003
    Posts
    1,619
    You do not link to the .DLL, you link to the .LIB that corresponds to the .DLL. So you would put opengl32.lib in your libraries. And it must be somewhere in the library path of VC++
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

  3. #18
    essence of digital xddxogm3's Avatar
    Join Date
    Sep 2003
    Posts
    589
    I'm not quite sure I'm understanding you correctly.
    Are saying the .lib is in the wrong folder on my machine?
    I haven't moved anything, and it worked before?
    "Hence to fight and conquer in all your battles is not supreme excellence;
    supreme excellence consists in breaking the enemy's resistance without fighting."
    Art of War Sun Tzu

  4. #19
    essence of digital xddxogm3's Avatar
    Join Date
    Sep 2003
    Posts
    589
    i figured it out.
    the opengl super bible printed in 99 is flawed
    it states to use .dll instead of .lib
    thanks again for the help cat you rule
    "Hence to fight and conquer in all your battles is not supreme excellence;
    supreme excellence consists in breaking the enemy's resistance without fighting."
    Art of War Sun Tzu

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linking OpenGL in Dev-C++
    By linkofazeroth in forum Game Programming
    Replies: 4
    Last Post: 09-13-2005, 10:17 AM
  2. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  3. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 07:57 PM
  4. OpenGL and Windows
    By sean345 in forum Game Programming
    Replies: 5
    Last Post: 06-24-2002, 10:14 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM