Page 1 of 1

r2136 Compile error mmdeviceapi.h

PostPosted: Tue Jan 26, 2010 12:42 pm
by Enjay
Code: Select allExpand view
.\src\sound\music_win_mididevice.cpp(45) : fatal error C1083: Cannot open include file: 'mmdeviceapi.h': No such file or directory


GZdoom 730 too.

I'm guessing that this file should be part of an MS SDK or something but I have been keeping my machine up to date and I don't seem to have this file. :?

[edit] It seems this should come with "Vista aware SDKs". Any suggestions? [/edit]

Re: r2136 Compile error mmdeviceapi.h

PostPosted: Tue Jan 26, 2010 12:47 pm
by Graf Zahl
It's something Vista related. I noticed I don't have it either - and I see no real need to upgrade the Windows SDK for it because I fear that'd cause more problems than it'll solve. Can't you place the stuff you need directly into the source so that ZDoom does not require the very latest SDK which most people do not have?

Re: r2136 Compile error mmdeviceapi.h

PostPosted: Tue Jan 26, 2010 1:10 pm
by Gez
I have it.

Re: r2136 Compile error mmdeviceapi.h

PostPosted: Tue Jan 26, 2010 2:48 pm
by Enjay
Is it just a header or does it have any dependant includes and would it be possible for you to upload it, and any dependancies somewhere? I've looked at the SDK and the size of the download is a bit rich for my internet connection. :?

Re: r2136 Compile error mmdeviceapi.h

PostPosted: Tue Jan 26, 2010 3:15 pm
by Gez
Here's the start of the file, so you can see what's #included in it.

Spoiler:


Also, you can get a mmdeviceapi.zip from the SVN FTP, but I'm not sure it'd be helpful; in my experience mixing and matching parts from different versions of an SDK seldom result in something that accepts to work.

Re: r2136 Compile error mmdeviceapi.h

PostPosted: Tue Jan 26, 2010 6:47 pm
by randi
Graf Zahl wrote:the very latest SDK

Err, I'm pretty sure this was part of the Windows Vista SDK, which I believe was 6.0 and released some three years ago. It's certainly in the current version 7.0 of the Windows SDK, at any rate. Maybe I could try and pull the necessary bits out of the header, but I don't really like to copy-paste COM interface definitions out of their SDK header files.
Graf Zahl wrote:I see no real need to upgrade the Windows SDK

I can see a configuration utility the Windows SDK installs to select the active version of the SDK, so it looks like you can have multiple installations of different versions of the SDK. So you wouldn't exactly need to upgrade, so to speak.

Re: r2136 Compile error mmdeviceapi.h

PostPosted: Tue Jan 26, 2010 8:08 pm
by Enjay
For info, with some help from Gez, I have managed to get the right files and compiled both Zdoom and GZdoom. I've tested them both and they seem OK.

For info, you can do this with a relatively small download using the Web setup program from the MS SDK website. This is a screenshot showing the sections that I downloaded.

Image
(it says 0 bytes because I already have them - the DL took about 15 minutes for me)

I don't suppose all of that is needed, but it worked.

When setting up the path to the include directory in Visual C++, it needs to be quite high in the list otherwise your get a bunch of errors mentioning "REFPROPVARIANT". Moving the new include directory to the top of the list cured this. I'm not sure, however, if I should simply remove references to the old SDK include directory. I'll check that tomorrow. It's getting late.

Re: r2136 Compile error mmdeviceapi.h

PostPosted: Tue Jan 26, 2010 9:16 pm
by Charlotte Worthingstone
You could have lightened your download even further: You don't need the IA64 Libraries, since those are only for Itaniums. You also don't need the x64 Libraries if you don't plan on making any 64-bit binaries (which you can't do without hacking the Visual C++ Express Edition anyway).

Re: r2136 Compile error mmdeviceapi.h

PostPosted: Wed Jan 27, 2010 2:39 am
by Graf Zahl
Well, I don't think we need this anymore.


EDIT: Grrr, I should have listened to my bad feeling about this. Microsoft cannot be trusted with such stuff. Now my VS2008 installation which I need for work is broken.