c (not c#) compiler

  • Thread starter Thread starter grs
  • Start date Start date
G

grs

We work in C# but have a need to compile and create a DLL of c code. I have
never programmed in c, can you do this in visual studio 2005.

It is c not c++.

Any suggestions would be appreciated


thanks
grs
 
Not really the right group, but there are three issues at hand.

1) Yes, you can program c and c++ code in VS.NET. You should check the
documentation that is provided with VS.NET to see how to do this. I believe
you just create a C++ project and since C++ is backward compatible with C,
then you should be able to do everything that C allows.
2) If you have never programmed in C, then you will need to pick up some
books on the subject. Although the syntax is similar to C#, it is in no way
the same language. Concepts that you know in C# will not be available in C
and depending on the complexity of what you need done, learning C may be a
challenging endeavor.
3) C cannot compile to a .NET language. If you are looking for simply
referencing an assembly written in C, you are out of luck. The best you
would be able to do is to create the DLLs and then use the functions using
p/invoke calls.
 
Peter,
Just to add one detail - if you use an extension of .c (rather than
..cpp), the C++ compiler will treat the code as C automatically.
Bob
 
Back
Top