View Full Version : HOW CAN I RUN OPENGL CODE IN VISUAL C++?
Well the title says it all, I read I have to put glu32.lib and glu32.dll into systems and library files, but I don't know where these files are or how to put them were they're supposed to be.
And I've tried running code using Visual C++, just says it cannot be executed.
Anyone help?
Silkut
10-05-2004, 01:05 AM
Hey, what's wrong with you ?
1/ Please don't use capslock like that
2/ Make a research to know if your question was not resolved in the past...
3/ There is no 3/
Ok, if you want tu use gl,Glu, GLUT or any extensions you must "say" to your compiler that take care about libraries, 'many tips to make that...
Go to the menu Project>Settings>Link and you must specify what libraries you want to use, in exemple:
add "opengl32.lib glu32.lib glut32.lib"
Inside your code you must specify your headers
#include<what_you_want.h>
In this case you must place libraries and headers in exactly right place -->
C:/.../Visual_C++_location/MS98/INLCUDE(or /LIB)
If you compute that:
#include"your_header.h"
It means your file must be located where your project is
Unresolved external symbol errors are fueled by a wrong libraries or header linking/code
Hope that helps you
pdX
Also which Visual C++ are you running? The latest one I think takes care of all the library troubles for you. I didn't have to explicitly include a library in a project for a long time now.
Silkut
10-05-2004, 07:35 AM
He use MS VisualC++ 6.0 IMHO, it's the most used through the galaxy and external frontier ;)
amando
10-12-2004, 11:06 AM
the best way to get a lib is:
#include <gl/gl.h>
#pragma comment (lib, "opengl32")
//#pragma comment (lib, "glu32")
//#pragma comment (lib, "glaux")
for each *.h you need the according *.lib. as far as i know, the 3 above should do it. with the pragma-instruction, you won't need the project settings ever again, and more: you can send *running* files to your mates.
good luck!
Amando
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.