tags:

views:

1225

answers:

3

I downloaded some example code from the internet, but when I compiled it I ran into some trouble. My compiler tells me: comdef.h: No such file or directory.

I searched a bit on the internet, but I couldn't find anyone else with the same problem and I have no clue where I can obtain this header file.

I use codeblocks with the GNU GCC compiler.

A: 

The file should be available after installing the Microsoft Platform SDK. Don't know how well it works with GNU GCC though.

http://www.microsoft.com/msdownload/platformsdk/sdkupdate/

dalle
+3  A: 

The file is available with Visual Studio (not sure you have to install Platform SDK). You can get comdef.h from the Web but for sure you will have some troubles getting it to compile with your sources.

smink
comdef.h comes with Visual C++/Visual Studio (part of the compiler's "built-in COM support"). There is no relationship to the Platform SDK as far as I know.
Chris Jester-Young
Ok Chris that was my initial understanding.
smink
+2  A: 

As other posters have said, comdef.h comes with Visual C++. It supplements the VC-specific builtin COM support. Since you say you're using GCC, you will probably have to adapt your code to use "low-level COM", since GCC doesn't have the kind of builtin COM support that VC has (in specific, using #import for importing type libraries into convenient wrapper classes).

Chris Jester-Young