-
October 24th, 2011, 05:11 PM
#1
Freeglut problems.
Hi im using freeglut 2.6.0 and i cant find the .lib files. Could you help me.
-
October 24th, 2011, 06:08 PM
#2
Re: Freeglut problems.
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.
-
October 25th, 2011, 02:06 PM
#3
Re: Freeglut problems.
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.
-
October 25th, 2011, 03:10 PM
#4
Re: Freeglut problems.
You need them. What Philip said was that you can download the source and build them yourself.
-
October 25th, 2011, 06:57 PM
#5
Re: Freeglut problems.
But how do I build it myself? I don't know how to build things.
-
October 25th, 2011, 09:14 PM
#6
Re: Freeglut problems.
What operating system and compiler are you using ?
-
October 26th, 2011, 02:09 PM
#7
Re: Freeglut problems.
Im using windows vista and visual c++ 2010.
-
October 26th, 2011, 02:24 PM
#8
Re: Freeglut problems.
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.
-
October 27th, 2011, 03:23 PM
#9
Re: Freeglut problems.
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:
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
}
But if I take the mouse click detection out it doesn't have the errors.
Error Log:
Code:
'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).
Can anyone help me fix this? Thanks in ahead
Also thanks for the help Philip and S M A.
Last edited by HavingPhun; October 28th, 2011 at 06:08 AM.
-
October 27th, 2011, 04:38 PM
#10
Re: Freeglut problems.
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?
-
October 27th, 2011, 04:47 PM
#11
Re: Freeglut problems.
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.
-
October 27th, 2011, 10:45 PM
#12
Re: Freeglut problems.
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()
-
October 28th, 2011, 06:07 AM
#13
-
October 28th, 2011, 11:51 AM
#14
Re: Freeglut problems.
Can you give me an example of how to use glutMouseFunc() and the arguments it requires?
-
October 28th, 2011, 06:24 PM
#15
Re: Freeglut problems.
It works now. Just had to put glutInit() before everything else like you said.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|