Hi im using freeglut 2.6.0 and i cant find the .lib files. Could you help me.
Printable View
Hi im using freeglut 2.6.0 and i cant find the .lib files. Could you help me.
You can download the source at:
[urlhttp://freeglut.sourceforge.net/index.php#download[/url]
Then you build the libraries. The Windows workspace worked with no
changes using VC++ 2010.
I would guess that the Linux version would also build without problems,
but I can not test it right now.
so i don't need lib files? The only reason i wanted them is because the tutorial i was using said to use them. But it is an older tutorial so maybe i dont need them anymore.
You need them. What Philip said was that you can download the source and build them yourself.
But how do I build it myself? I don't know how to build things.
What operating system and compiler are you using ?
Im using windows vista and visual c++ 2010.
I downloaded the 2.6.0 package from the page Philip gave. The package contains a VC2008 sln, in VisualStudio2008 for a dll and in VisualStudio2008static for lib. Just open the sln you want, let VC2010 convert the project and then press F7 to build it.
Ok so i have it built and running fine but I have another problem. I have a simple program that creates a window, but if I add mouse click detection it causes and error.
Program:
But if I take the mouse click detection out it doesn't have the errors.Code:
#include <GL/glew.h> // Include the GLEW header file
#include <GL/glut.h> // Include the GLUT header file
void display (void)
{
glClearColor(1.0f, 0.0f, 0.0f, 1.0f); // Clear the background of our window to red
glClear(GL_COLOR_BUFFER_BIT); //Clear the colour buffer (more buffers later on)
glLoadIdentity(); // Load the Identity Matrix to reset our drawing locations
glFlush(); // Flush the OpenGL buffers to the window
}
void reshape (int width, int height)
{
glViewport(0, 0, (GLsizei)width, (GLsizei)height); // Set our viewport to the size of our window
glMatrixMode(GL_PROJECTION); // Switch to the projection matrix so that we can manipulate how our scene is viewed
glLoadIdentity(); // Reset the projection matrix to the identity matrix so that we don't get any artifacts (cleaning up)
gluPerspective(60, (GLfloat)width / (GLfloat)height, 1.0, 100.0); // Set the Field of view angle (in degrees), the aspect ratio of our window, and the new and far planes
glMatrixMode(GL_MODELVIEW); // Switch back to the model view matrix, so that we can start drawing shapes correctly
}
void keyPressed (unsigned char key, int x, int y)
{
}
void keyUp (unsigned char key, int x, int y)
{
}
int main (int argc, char **argv)
{
glutKeyboardFunc(keyPressed); // Tell GLUT to use the method "keyPressed" for key presses
glutKeyboardUpFunc(keyUp); // Tell GLUT to use the method "keyUp" for key up events
glutInit(&argc, argv); // Initialize GLUT
glutInitDisplayMode (GLUT_SINGLE); // Set up a basic display buffer (only single buffered for now)
glutInitWindowSize (800, 600); // Set the width and height of the window
glutInitWindowPosition (100, 100); // Set the position of the window
glutCreateWindow ("Biolife"); // Set the title for the window
glutDisplayFunc(display); // Tell GLUT to use the method "display" for rendering
glutReshapeFunc(reshape); // Tell GLUT to use the method "reshape" for rendering
glutMainLoop(); // Enter GLUT's main loop
}
Error Log:
Can anyone help me fix this? Thanks in aheadCode:
'Biolife.exe': Loaded 'C:\Program Files\Biolife\Debug\Biolife.exe', Symbols loaded.
'Biolife.exe': Loaded 'C:\WINDOWS\System32\ntdll.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\kernel32.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\freeglut.dll', Symbols loaded.
'Biolife.exe': Loaded 'C:\WINDOWS\System32\user32.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\gdi32.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\advapi32.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\rpcrt4.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\opengl32.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\msvcrt.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\glu32.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\ddraw.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\dciman32.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\setupapi.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\oleaut32.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\ole32.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\dwmapi.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\winmm.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\oleacc.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\msvcr100d.dll', Symbols loaded.
'Biolife.exe': Loaded 'C:\WINDOWS\System32\shimeng.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\apphelp.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\AppPatch\AcLayers.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\shell32.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\shlwapi.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\userenv.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\secur32.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\winspool.drv', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\mpr.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\imm32.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\msctf.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\lpk.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\System32\usp10.dll', Cannot find or open the PDB file
'Biolife.exe': Loaded 'C:\WINDOWS\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6001.18000_none_5cdbaa5a083979cc\comctl32.dll', Cannot find or open the PDB file
The program '[3816] Biolife.exe: Native' has exited with code 1 (0x1).
Also thanks for the help Philip and S M A.
If you by code thing means code tags you did almost get those right. They should be [code]Code here[/code]. Additional formatting tags can be found here http://www.codeguru.com/forum/misc.php?do=bbcode#code
I've never worked with glut but shouldn't glutInit be the very first call? Are there any other calls that should be made in another order?
Ok well i am new to glut, but i only encounter this problem when i add mouse click detection so i don't know why this is happening.
Did you move the call to glutKeyboardFunc() to after glutInit()
as suggested by S_M_A ?
Also, that does not catch match clicks. To process mouse clicks use
glutMouseFunc()
ok ill try that.
Can you give me an example of how to use glutMouseFunc() and the arguments it requires?
It works now. Just had to put glutInit() before everything else like you said.