Error with winmm.lib

  • (2 Pages)
  • +
  • 1
  • 2

26 Replies - 3081 Views - Last Post: 27 July 2012 - 04:51 PM Rate Topic: -----

#1 ericetc  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 24-July 12

Error with winmm.lib

Posted 26 July 2012 - 06:56 PM

Hi,

I am getting 'fatal error LNK1104: cannot open file 'WinMM.Lib;' when trying to load the program in the following thread in vc++. I have followed the instructions explicitly.

http://www.dreaminco...ndows-api-in-c/

I have tried linking the lib in Project Properties / Configuration Properties / Linker / General / Additional Library Directories (as well as the linking given in the other thread) and still I get the error. Any ideas as to what I am missing?

Thanks
Eric

Mod edit:
Moved to the C & C++ help forum. Please try not to post questions in the Tutorials section.

This post has been edited by Atli: 26 July 2012 - 07:01 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Error with winmm.lib

#2 #define  Icon User is offline

  • Duke of Err
  • member icon

Reputation: 1396
  • View blog
  • Posts: 4,858
  • Joined: 19-February 09

Re: Error with winmm.lib

Posted 26 July 2012 - 07:39 PM

Does the path name to the library files contain spaces?

If so, does it have quotes in the Additional Dependencies section?

This post has been edited by #define: 26 July 2012 - 07:41 PM

Was This Post Helpful? 0
  • +
  • -

#3 ericetc  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 24-July 12

Re: Error with winmm.lib

Posted 26 July 2012 - 08:19 PM

No spaces but it has quotes
Was This Post Helpful? 0
  • +
  • -

#4 jimblumberg  Icon User is online

  • member icon


Reputation: 4223
  • View blog
  • Posts: 13,244
  • Joined: 25-December 09

Re: Error with winmm.lib

Posted 26 July 2012 - 08:31 PM

I'm not too familiar with the Visual C++ IDE but, posting the contents of your .sln file may help diagnose the problem.

Jim
Was This Post Helpful? 0
  • +
  • -

#5 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3647
  • View blog
  • Posts: 11,413
  • Joined: 05-May 12

Re: Error with winmm.lib

Posted 26 July 2012 - 10:51 PM

Good point, Jim.

With VC2008, the .sln file isn't very interesting. I don't use that compiler anymore, but I believe that the .vcxproj file has all the compiler and linker settings.
Was This Post Helpful? 0
  • +
  • -

#6 jimblumberg  Icon User is online

  • member icon


Reputation: 4223
  • View blog
  • Posts: 13,244
  • Joined: 25-December 09

Re: Error with winmm.lib

Posted 27 July 2012 - 12:51 AM

Okay, I had a feeling it was the .vcxproj file but my quick search didn't turn up much info on the contents of this file. 50/50 chance... wrong again.

Jim
Was This Post Helpful? 0
  • +
  • -

#7 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 833
  • View blog
  • Posts: 2,456
  • Joined: 20-March 10

Re: Error with winmm.lib

Posted 27 July 2012 - 01:05 AM

Which version of VS
Are you using ?

Try taking WinMM.lib out of the linker
section and try just using a pragma comment
Below your includes and see if that finds
it.

It seems the problem at the moment
Is it cannot find WinMM.lib

Snoopy.
Was This Post Helpful? 0
  • +
  • -

#8 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3647
  • View blog
  • Posts: 11,413
  • Joined: 05-May 12

Re: Error with winmm.lib

Posted 27 July 2012 - 02:07 AM

What is interesting is that when he said that he took out WinMM.lib, then he started getting problems trying to find kernel32.lib. Sounds like a bad library path setting.

Seeing the .vcxproj will give us something more definitive.
Was This Post Helpful? 0
  • +
  • -

#9 ericetc  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 24-July 12

Re: Error with winmm.lib

Posted 27 July 2012 - 09:13 AM

Ok here is the .sln file. Hopefully it will help
Was This Post Helpful? 0
  • +
  • -

#10 ericetc  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 24-July 12

Re: Error with winmm.lib

Posted 27 July 2012 - 09:21 AM

It didn't upload obviously. I apologize for that and not knowing how to edit my comments (I don't see an edit option).
Was This Post Helpful? 0
  • +
  • -

#11 jimblumberg  Icon User is online

  • member icon


Reputation: 4223
  • View blog
  • Posts: 13,244
  • Joined: 25-December 09

Re: Error with winmm.lib

Posted 27 July 2012 - 09:26 AM

You don't yet have enough posts to edit your posts. You may have to change the extension to .txt to properly add the file (yoursolution.sln.txt should work). Also post the vcxproj as well.

Jim
Was This Post Helpful? 0
  • +
  • -

#12 ericetc  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 24-July 12

Re: Error with winmm.lib

Posted 27 July 2012 - 09:39 AM

Perhaps this is missing critical information but the most I have been able to do is open the .sln and prj files up in web browser and copy what is there to a text file.

Eric

Attached File(s)


Was This Post Helpful? 0
  • +
  • -

#13 jimblumberg  Icon User is online

  • member icon


Reputation: 4223
  • View blog
  • Posts: 13,244
  • Joined: 25-December 09

Re: Error with winmm.lib

Posted 27 July 2012 - 09:52 AM

PRJ file:

<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioUserFile
	ProjectType="Visual C++"
	Version="9.00"
	ShowAllFiles="false"
	>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			>
			<DebugSettings
				Command="$(TargetPath)"
				WorkingDirectory=""
				CommandArguments=""
				Attach="false"
				DebuggerType="3"
				Remote="1"
				RemoteMachine="ERIC-PC"
				RemoteCommand=""
				HttpUrl=""
				PDBPath=""
				SQLDebugging=""
				Environment=""
				EnvironmentMerge="true"
				DebuggerFlavor=""
				MPIRunCommand=""
				MPIRunArguments=""
				MPIRunWorkingDirectory=""
				ApplicationCommand=""
				ApplicationArguments=""
				ShimCommand=""
				MPIAcceptMode=""
				MPIAcceptFilter=""
			/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			>
			<DebugSettings
				Command="$(TargetPath)"
				WorkingDirectory=""
				CommandArguments=""
				Attach="false"
				DebuggerType="3"
				Remote="1"
				RemoteMachine="ERIC-PC"
				RemoteCommand=""
				HttpUrl=""
				PDBPath=""
				SQLDebugging=""
				Environment=""
				EnvironmentMerge="true"
				DebuggerFlavor=""
				MPIRunCommand=""
				MPIRunArguments=""
				MPIRunWorkingDirectory=""
				ApplicationCommand=""
				ApplicationArguments=""
				ShimCommand=""
				MPIAcceptMode=""
				MPIAcceptFilter=""
			/>
		</Configuration>
	</Configurations>
</VisualStudioUserFile>

I may be missing something, I don't see where you have added anything to this project.

Jim
Was This Post Helpful? 0
  • +
  • -

#14 ericetc  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 24-July 12

Re: Error with winmm.lib

Posted 27 July 2012 - 09:56 AM

I don't see anything either but it has wavrecord.cpp, resource.h and stafx.h

Sorry, I meant stdafx.h.
Was This Post Helpful? 0
  • +
  • -

#15 jimblumberg  Icon User is online

  • member icon


Reputation: 4223
  • View blog
  • Posts: 13,244
  • Joined: 25-December 09

Re: Error with winmm.lib

Posted 27 July 2012 - 10:03 AM

Quote

I don't see anything either but it has wavrecord.cpp, resource.h and stafx.h

What has these files, they don't seem to be part of your project. How exactly did you add these files to your project? For example here is an example of a project file that has had some files added to it:
Spoiler



Jim
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2