Where do i install the opengl sdk(its self extracting). I tried a few diff. places and still cant make any opengl programs. Anyone else have a problem with missing dll's ?
Printable View
Where do i install the opengl sdk(its self extracting). I tried a few diff. places and still cant make any opengl programs. Anyone else have a problem with missing dll's ?
Move the DLLs into either your Windows\System32 directory, or into your program's directory.
Z.
OpenGL SDK? The Silicon Graphics one?Quote:
Originally posted by slx47
Where do i install the opengl sdk(its self extracting). I tried a few diff. places and still cant make any opengl programs. Anyone else have a problem with missing dll's ?
That's been unsupported by them for a while now. Why can't you just use the normal documentation?
I should say im using windows xp. Does anyone know if gl has problems running on xp ?
OpenGL runs pretty much perfectly on everything as long as there are drivers for it.
http://www.parksie.net/gl2.zip
Does this run at an acceptable speed?
What graphics card do you have?
i know i have all the dll's,.h,.lib files in the right spot. Now when i compile some on my programs it compiles but it has problems linking. The linker has problems with the functions under main()
Code:
#include <windows.h>
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glut.h>
#include <math.h>
// Define a constant for the value of PI
#define GL_PI 3.1415f
// Rotation amounts
static GLfloat xRot = 0.0f;
static GLfloat yRot = 0.0f;
// Called to draw scene
void RenderScene(void)
{
GLfloat x,y,z,angle; // Storeage for coordinates and angles
// Clear the window with current clearing color
glClear(GL_COLOR_BUFFER_BIT);
// Save matrix state and do the rotation
glPushMatrix();
glRotatef(xRot, 1.0f, 0.0f, 0.0f);
glRotatef(yRot, 0.0f, 1.0f, 0.0f);
// Call only once for all remaining points
glBegin(GL_LINES);
z = 0.0f;
for(angle = 0.0f; angle <= GL_PI*3.0f; angle += 0.5f)
{
// Top half of the circle
x = 50.0f*sin(angle);
y = 50.0f*cos(angle);
glVertex3f(x, y, z);
// Bottom half of the circle
x = 50.0f*sin(angle+3.1415f);
y = 50.0f*cos(angle+3.1415f);
glVertex3f(x, y, z);
}
// Done drawing points
glEnd();
// Restore transformations
glPopMatrix();
// Flush drawing commands
glutSwapBuffers();
}
// This function does any needed initialization on the rendering
// context.
void SetupRC()
{
// Black background
glClearColor(0.0f, 0.0f, 0.0f, 1.0f );
// Set drawing color to green
glColor3f(0.0f, 1.0f, 0.0f);
}
void SpecialKeys(int key, int x, int y)
{
if(key == GLUT_KEY_UP)
xRot-= 5.0f;
if(key == GLUT_KEY_DOWN)
xRot += 5.0f;
if(key == GLUT_KEY_LEFT)
yRot -= 5.0f;
if(key == GLUT_KEY_RIGHT)
yRot += 5.0f;
if(key > 356.0f)
xRot = 0.0f;
if(key < -1.0f)
xRot = 355.0f;
if(key > 356.0f)
yRot = 0.0f;
if(key < -1.0f)
yRot = 355.0f;
// Refresh the Window
glutPostRedisplay();
}
void ChangeSize(int w, int h)
{
GLfloat nRange = 100.0f;
// Prevent a divide by zero
if(h == 0)
h = 1;
// Set Viewport to window dimensions
glViewport(0, 0, w, h);
// Reset coordinate system
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
// Establish clipping volume (left, right, bottom, top, near, far)
if (w <= h)
glOrtho (-nRange, nRange, -nRange*h/w, nRange*h/w, -nRange, nRange);
else
glOrtho (-nRange*w/h, nRange*w/h, -nRange, nRange, -nRange, nRange);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
int main(int argc, char* argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutCreateWindow("Lines Example");
glutReshapeFunc(ChangeSize);
glutSpecialFunc(SpecialKeys);
glutDisplayFunc(RenderScene);
SetupRC();
glutMainLoop();
return 0;
}
Do you have glut32.lib?
I checked and i have all the right files in the right places. The links says this:
c:\documents and settings\ralph\my documents\untitled1.o(.text+0xf):untitled1.cpp: undefined reference to `glClear@4'
c:\documents and settings\ralph\my documents\untitled1.o(.text+0x17):untitled1.cpp: undefined reference to `glFlush@0'
c:\documents and settings\ralph\my documents\untitled1.o(.text+0x39):untitled1.cpp: undefined reference to `glClearColor@16'
c:\documents and settings\ralph\my documents\untitled1.o(.text+0x5d):untitled1.cpp: undefined reference to `glutInitDisplayMode@4'
c:\documents and settings\ralph\my documents\untitled1.o(.text+0x6d):untitled1.cpp: undefined reference to `glutCreateWindow@4'
c:\documents and settings\ralph\my documents\untitled1.o(.text+0x7d):untitled1.cpp: undefined reference to `glutDisplayFunc@4'
c:\documents and settings\ralph\my documents\untitled1.o(.text+0x8a):untitled1.cpp: undefined reference to `glutMainLoop@0'
You need to make sure you're linking with opengl32.lib and glut32.lib.
I think the lib files should work i dont why it isnt working !!!
What compiler?
Under MSVC, go to Project Settings->Linker, and add them to the list.
i use: dec 4 c++ for a compiler. I also tried code warrior and it doesnt work for that either.
Oh.
Are the .lib files in the directory the linker will look in? Also the glut32.lib file was made with the latest Microsoft linker so that might affect it.
You're probably best off downloading GLUT 3.7 and compiling it yourself to get a .lib out of it.
im not sure what it is.
You'd need to check the compiler/linker documentation for more details, I really can't help much further :( (happy VC user here)
ive just tried vc and that didnt work either. Im not sure if its windows xp or not but no compiler will work with it.
Do you have the Platform SDK? You probably need the linker tools from that.
no i dont have the platform sdk. :(
Download it then :)
It's extremely useful; I think you need the build tools as well (gaaaaawd why can't people just get along and write files that work with something else!!)
do you know where i can get it from ?
Ummm...Microsoft, who else? :D
http://msdn.microsoft.com/downloads
the site
there is no option to download it, you can only order a cd for 8.00 is there another way to download ?
http://www.microsoft.com/msdownload/...sdk/sdkupdate/
If you want to keep with Dev-C++ your best bet is to generate the libraries using that...I don't have a copy though.