开发者

Generating unmanaged C++ via CodeDom

开发者 https://www.devze.com 2023-01-04 01:03 出处:网络
I\'m looking to programmatically generate unmanaged C+开发者_如何学Go+ code via CodeDom. It seems that the default implementation of CppCodeProvider is only capable of generating managed C++/CLI.

I'm looking to programmatically generate unmanaged C+开发者_如何学Go+ code via CodeDom. It seems that the default implementation of CppCodeProvider is only capable of generating managed C++/CLI.

Any alternatives out there?

Thanks!


That's not going to fly. There's a rather serious impedance mismatch between the classes in the System.CodeDom, like CodeStatement et al, and the structure of a native C++ program. There's no way to model something as basic as a non-class member function, not supported in managed code. Or the notion of #including header files. Or single-pass compilation. Etcetera.


Take a look at tools from OSSNokalva. They have some interesting tools for code generation from XSD. http://www.oss.com/


As far as I know, there's no way of building native C++ built in to .NET. I've been looking for a long time. Even if you build a Visual Studio Extension, you can't generate it in the same way that you can just have string[] sources for the C# compiler.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号