winmm32.lib error

Started by
16 comments, last by flodywan 14 years, 2 months ago
I keep getting the error: fatal error LNK1104: cannot open file 'winmm.lib' I've been trying to figure this out for hours. I added: opengl32.lib glut32.lib GLU32.lib GLAUX.lib into my linker->input->additional dependencies and I put the correct directories for my VC++ directories. Any ideas how to fix this? The code I'm using to debug is: #include <stdlib.h> #include <GL/glut.h> void Draw(void) { glClearColor(1,1,1,0); glClear(GL_COLOR_BUFFER_BIT); glColor3f(1,0,0); glBegin(GL_TRIANGLES); glVertex3f(-0.5,-0.5,0); glVertex3f(0.0,0.5,0); glVertex3f(0.5,-0.5,0); glEnd(); glFlush(); }
Advertisement
Have you installed a Platform/Windows SDK, and put its lib directory in MSVC's directory list for libraries?

<GL/glut.h> is trying to link to winmm.lib (via a #pragma), so you need this library.
Yeah I installed the Microsoft SDK and put its directory in the VC++ library directories. Is there anything else I need to do with the SDK? If not, any other ideas?
Can you quickly double check you've got the right directory listed? You should be able to manually find winmm.lib in one of those listed directories.
I may be missing or misunderstanding something:
I had to add 'winmm.lib' in the 'project/your_project properties/linker/input/additional dependencies.

But I don't see why it id needed with that minimal code you posted. I hade to add because timeGetTime
I can't find the winmm.lib file. I searched through all the directories and it's not there. Would it be smart to reinstall the SDK? Is there another way to get the winmm.lib file, because the SDK installation took quite a long time.
BTW what is SDK? I don't remember installing it.
You could google "winmm.lib download" for example.
Yeah I googled "winmm.lib download" and nothing came up. It looks like I'll just have to reinstall the SDK.
To be sure, are other people using the Microsoft ® Windows Server® 2003 R2 Platform SDK? That's the one I first downloaded, and I'm not sure if I should try a different one.
Quote:Original post by flodywan
To be sure, are other people using the Microsoft ® Windows Server® 2003 R2 Platform SDK?
On at least one PC, yes. And I have WinMM.lib in the "Lib" directory of the Platform SDK.

This topic is closed to new replies.

Advertisement