PDA

View Full Version : GLUT32.LIB problem



texas
06-05-2005, 01:10 PM
I am new to OpenGL and am trying to compile the first basic program in the OpenGL Superbible using Borland's C++ Builder 6. I am using the GLUT32.LIB from the glut-3.7 folder included in the Superbible. Any suggestions?

[Linker Error] 'C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\GLUT32.LIB' contains invalid OMF record, type 0x21 (possibly COFF)

code follows:
#include <vcl.h>
//#pragma hdrstop

#include <windows.h>
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glut.h>

//---------------------------------------------------------------------------
void RenderScene(void)
{
// Clear the window with current clearing color
glClear(GL_COLOR_BUFFER_BIT);

// Flush drawing commands
glFlush();
}

//---------------------------------------------------------------------------
// Setup Rendering State
void SetupRC(void)
{
glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
}

//---------------------------------------------------------------------------
void main(void)
{
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutCreateWindow("Simple");
glutDisplayFunc(RenderScene);

SetupRC();

glutMainLoop();
}

06-05-2005, 10:21 PM
The problem with .lib files is that they come in different flavors. The one you got there is probably for Microsofts Visual Studio C++.

Borland uses a differend object format that is not compatible with Microsofts.

Since this is a problem that pops up on a regular basis Borland included a tools that extracts a Borland .lib for any given .dll.

You have to look for it though, cant recall its name right now (I dont like the Borland compiler all that much).

01-18-2006, 06:43 AM
texas did you figure out what that tool is.If so can you tell?I've got the same problem.