[Media_api] Can media_api Build PortMIDI under Visual C++ 2005 for Fun and Profit?

Roger Dannenberg rbd at cs.cmu.edu
Thu Apr 12 09:40:02 PDT 2007


I have no experience yet building .NET applications or working with the 
Common Language Runtime (clr), but the error message "cl : Command line 
error D8045 : cannot compile C file 'xxx' with the /clr option" is due 
to an attempt to compile C files using the /clr switch. The clr provides 
common libraries so that C++, C#, Visual Basic, etc. can use a shared 
heap with garbage collection etc. I assume you need the clr because of 
Windows Forms. It looks like there's an option, /TP, to compile .c files 
as C++, or alternatively, you can probably rename portmidi .c files to 
.cpp. There might be some minor issues with coercing types, but I think 
portmidi code should compile as C++ sources. I don't know whether there 
are critical issues with C-style memory allocation/deallocation while 
running with the clr. -Roger



More information about the media_api mailing list