I’m a total newbie to OpenGL, and I’m using Visual C++. I’ve downloaded the source for a very simple example program just get to me started, and it hasn’t. Basically, any time I try to make a .exe from this file, I get the linker error LNK2001 - unresolved external symbol - for every OpenGL function I try to run - in the form __imp___glBegin@4.
Since this happens even with glBegin, glEnd, glClear, etc. I’m assuming this isn’t a simple version error. My lib directory has opengl32.lib, glu32.lib, glaux.lib, I’ve got the correct header files <gl/gl.h>. I’ve got the correct .dll cos I downloaded them again just in case, so what the **** is going on?
Thanks for any help you are able to give.
Actually, I just sorted it - duh, sorry I’m not a complete beginner to C++ I just never used any non-standard .lib modules in my code before. Please ignore my rubbish.
Originally posted by ByronThomas:
[b]Hi there,
I’m a total newbie to OpenGL, and I’m using Visual C++. I’ve downloaded the source for a very simple example program just get to me started, and it hasn’t. Basically, any time I try to make a .exe from this file, I get the linker error LNK2001 - unresolved external symbol - for every OpenGL function I try to run - in the form __imp___glBegin@4.
Since this happens even with glBegin, glEnd, glClear, etc. I’m assuming this isn’t a simple version error. My lib directory has opengl32.lib, glu32.lib, glaux.lib, I’ve got the correct header files <gl/gl.h>. I’ve got the correct .dll cos I downloaded them again just in case, so what the **** is going on?
Thanks for any help you are able to give.
Are you sure, your LIBs are compatibl with your compiler? Just in case, try to import them from the dlls ( syntax in BC++ is <implib newLib fromDll> for example [i]implib “c:\program files\c++\lib\opengl32.lib” "c:[/i] dir \opengl32.dll", but I guess VC++ has a tool for that)
Hi,
Try this : (I use visual C++ 6.0)
Project > Settings > Link.
In “Object/library module”, write somewhere on the line the name of the .lib you call.
For example opengl32.lib, glut.lib …