开发者

Compiling C code for .NET [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

H开发者_StackOverflow社区ow can I compile C code for use in .NET?

There is a game that written in C; how can I convert it to .Net code or use some parts of it?


You can't use C code directly within .NET.

You have a couple of options:

  1. Compile the C code into a dynamic link library, and use P/Invoke in order to call it from your .NET program.

  2. Port the C code to .NET.

  3. Wrap the C code using C++/CLI (making a mixed mode assembly), and use these from within your other .NET language of choice.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜