Sign in to follow this  
flodywan

winmm32.lib error

Recommended Posts

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(); }

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
How do you find the libraries directory of the SDK? All the folders that are in my SDK are TOOLS, REGISTRATION, and OPEN BUILD ENVIRONMENT WINDOW. For some reason Registration isn't working, and I can't find any lib or header files.

Share this post


Link to post
Share on other sites
Quote:
Original post by flodywan
How do you find the libraries directory of the SDK? All the folders that are in my SDK are TOOLS, REGISTRATION, and OPEN BUILD ENVIRONMENT WINDOW. For some reason Registration isn't working, and I can't find any lib or header files.
Sounds like it's not installed properly then. Or are you talking about the start menu folders?

I have:
E:\Platform SDK\Lib\WinMM.lib.

Share this post


Link to post
Share on other sites
I'm looking in the actual directory and can't find any of the lib or header files. Maybe I'm just doing something wrong because I've installed 2 different versions of the SDK. Are the lib files and header files included always or do I have to manually add them?

God I feel like a noob

Share this post


Link to post
Share on other sites
I'm looking at C:\Microsoft Windows SDK v6.1

I don't have any lib or header folders in there.

All I have are:
Tools(folder. No lib files), Visual Studio Registration, CMD Shell, Release Notes, and Windows SDK documentation.

And I've tried reinstalling with both v6.1 and the 2003 version.

Share this post


Link to post
Share on other sites
Quote:
Original post by flodywan
Is there another way to get the winmm.lib file, because the SDK installation took quite a long time.

Quote:
I don't have any lib or header folders in there.

Mh, so essentially it took a long while to install just about nothing? That's weird.
Quote:
Yeah I googled "winmm.lib download" and nothing came up.

You really want to install it properly. Better take your time to set everything up right from the start, you don't want to run into more trouble in the future.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this