Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Compiling Problems, Borland C++ 5.02

  1. #1
    Guest

    Compiling Problems, Borland C++ 5.02

    I am working throught the OpenGL Superbible's AUX section...it says I have to...
    "To build this program, you need to set your compiler and link options to build a Win32 console (or
    text-based) application. You will need to link to the AUX library glaux.lib and the OpenGL import library
    opengl32.lib. See your compilerís documentation for individual instructions on building console
    applications."

    I setup a new project with the options:
    -Platform: Win32
    -Target Model: Console
    -Node: .c
    *nothing else selected

    I now insert this Code
    "
    #include <windows.h> // Standard Window #include <conio.h> // Console I/O functions
    #include <gl\gl.h> // OpenGL functions
    #include <gl\glaux.h> // AUX Library

    void main(void)
    {
    // These are the AUX functions to set up the window
    auxInitDisplayMode(AUX_SINGLE | AUX_RGBA);
    auxInitPosition(100,100,250,250);
    auxInitWindow("My first OpenGL Program");
    // These are the OpenGL functions that do something in the window
    glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
    glClear(GL_COLOR_BUFFER_BIT);
    glFlush();

    // Stop and wait for a keypress
    cprintf("Press any key to close the Window\n");
    getch();
    }
    "

    When I try and build the project I get a Linking error
    " Fatal: Unable to open file 'filename.def' "

    Anybody know what am I doing wrong?

    Many thanks
    HD

  2. #2
    Junior Member Newbie
    Join Date
    Oct 2000
    Posts
    13

    Re: Compiling Problems, Borland C++ 5.02

    Check out the projecttree and delete the filename.def entry


    -------------------- www.oglpp.de
    German OpenGL Programming Page

  3. #3
    Guest

    Re: Compiling Problems, Borland C++ 5.02

    Thx, Yup that got rid of that error, however I am now getting 3 Link errors (heres the new error
    )
    "Info :test.cpp: output file test.obj does not exist
    Info :Compiling C:\Temp\OpenGL Programs\test.cpp
    Info :Linking C:\Temp\OpenGL Programs\test.exe
    Error: Error: Unresolved external 'auxInitDisplayMode' referenced from C:\TEMP\OPENGL PROGRAMS\TEST.OBJ
    Error: Error: Unresolved external 'auxInitPosition' referenced from C:\TEMP\OPENGL PROGRAMS\TEST.OBJ
    Error: Error: Unresolved external 'auxInitWindowA' referenced from C:\TEMP\OPENGL PROGRAMS\TEST.OBJ
    "

    Any Ideas?

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

    Re: Compiling Problems, Borland C++ 5.02

    You need to add the glaux.lib to your project. If you're using VC++ you do that by going to Project->Settings->Link tab->External libraries (or something to that effect, I don't have access to VC++ right now to check the exact text.)
    Deiussum
    Software Engineer and OpenGL enthusiast

  5. #5
    Guest

    Re: Compiling Problems, Borland C++ 5.02

    Build the .lib file using the program implib.exe thusly:
    implib glaux.lib glaux.dll

Posting Permissions

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