Jump to content


OpenGL Redbook Samples


5 replies to this topic

#1 transkinetic

    New Member

  • Members
  • Pip
  • 1 posts

Posted 15 July 2005 - 07:38 AM

I've been going through The OpenGL Programming Guide (AKA the red book). All the examples are available for download here (http://www.opengl.or...ok/redbook.html). When I try to run them I get the following error.

Quote

This application has failed to start because glut.dll was not found. Re-installing the application may fix this problem.

After hunting down glut.dll and placing it in the folder with my examples, I get this error.

Quote

...failed to start because opengl.dll was not found...

After hunting down opengl.dll I get yet another error and this time google is no help.

Quote

...failed to start because HfxClasses.dll was not found...

I get the feeling that these all should have come together in a pack or something. I'm lost. What to do? Where do I get these mystery libraries? I can't find any info on opengl.org.

thanks for the assistance,

-spivey

#2 baldurk

    Senior Member

  • Members
  • PipPipPipPip
  • 1057 posts

Posted 15 July 2005 - 11:57 AM

transkinetic said:

Quote

...failed to start because opengl.dll was not found...

After hunting down opengl.dll I get yet another error and this time google is no help.

View Post


This seems suspect. If you really did mean opengl.dll rather than opengl32.dll then I'm wrong. If you did mean opengl32.dll, then that should be provided by your graphics card drivers - not wherever you downloaded it from.

That's all I can think of.
baldurk
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.

#3 SelArom

    New Member

  • Members
  • Pip
  • 3 posts

Posted 01 September 2005 - 05:08 PM

baldurk said:

transkinetic said:

Quote

...failed to start because opengl.dll was not found...

After hunting down opengl.dll I get yet another error and this time google is no help.

View Post


This seems suspect. If you really did mean opengl.dll rather than opengl32.dll then I'm wrong. If you did mean opengl32.dll, then that should be provided by your graphics card drivers - not wherever you downloaded it from.

That's all I can think of.

View Post


Hi, I am brand new to this, and I'm trying to get started with openGL. I'm using lcc-win32, and I managed to get my basic "helloworld" type program to compile, but i get this same exact error message! I've searched google and this is the only page I could find that has the same problem. downloading opengl.dll gave me the same error message you got after downloading opengl.dll too. did you ever find a resolution?

-SelArom

#4 awood

    Member

  • Members
  • PipPip
  • 33 posts

Posted 01 September 2005 - 06:59 PM

As indicated above, you should be using opengl32, not opengl. I prefer to link in the static library opengl32.lib. I know in visual studio, you can go to your project settings, and add opengl32.lib to the "Additional Dependencies" field (under Linker depending on your version).

#5 SelArom

    New Member

  • Members
  • Pip
  • 3 posts

Posted 01 September 2005 - 08:59 PM

awood said:

As indicated above, you should be using opengl32, not opengl.  I prefer to link in the static library opengl32.lib.  I know in visual studio, you can go to your project settings, and add opengl32.lib to the "Additional Dependencies" field (under Linker depending on your version).

View Post


I'm sorry but I don't understand. I'm using lcc-win32 and in the list of additional libraries I show: opengl32.lib glu32.lib glut.lib

if I take out glut.lib it won't compile. Here is the code:

#include <GL/glut.h>

void display(void)
{
	glClear(GL_COLOR_BUFFER_BIT);
	glBegin(GL_POLYGON);
	glVertex2f(-0.5, -0.5);
	glVertex2f(-0.5, 0.5);
	glVertex2f(0.5, 0.5);
	glVertex2f(0.5, -0.5);
	glEnd();
	glFlush();
}

void init(void)
{
	glClearColor(0.0, 0.0, 0.0, 0.0);
	glColor3f(1.0, 0.5, 0.5);
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	gluOrtho2D(-1.0, 1.0, -1.0, 1.0);
}

int main(int argc, char * argv[])
{
	glutInit(&argc, argv);
	glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
	glutInitWindowSize(500, 500);
	glutInitWindowPosition(0, 0);
	glutCreateWindow("Sample");
	glutDisplayFunc(display);
	init();
	glutMainLoop();
	return 0;
}

It compiles successfully, but when I execute it I get this error:

"c:\lcc\projects\lcc\main.exe"
Return code -1073741515
Execution time 0.064 seconds
Press any key to continue...

when I as comiling it at school, I also got a messagebox saying it could not find opengl.dll. now at home I just get the message above.

Edit: I forgot to copy glut32.dll and glut.dll to the project dir. NOW I'm getting the missing opengl.dll message here at home too...

-SelArom

#6 SelArom

    New Member

  • Members
  • Pip
  • 3 posts

Posted 01 September 2005 - 09:06 PM

NEVER MIND!!! I changed glut.lib to glut32.lib and ALL IS WELL

thanks anyway I guess i'm just retarded :)

-SelArom





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users