Compiling C to use the CLR

Possible Duplicate:
Compiling C Code for .NET

I have a bunch of C source code and I want to compile it to use the .NET framework. I downloaded Microsoft Visual C ++ and selected a new CLR project. Then I added all the C code, and I tried to compile the files. He said

cl : Command line error D8045: cannot compile C file '..\..\..\..\..\Downloads\lzma912\C\XzDec.c' with the /clr option

Why can't I compile this?

+3
source share
2 answers

Sometimes, looking at MSDN, you can clarify the situation. You need to get the compiler to treat C files as C ++ files. See here .

Quote:

++ , /clr. /TP .c .cpp ; . /Tc,/Tp,/TC,/TP ( ) .

+15

/Tp, V++ , - ++, C. , .

+5

Source: https://habr.com/ru/post/1763461/


All Articles