471,327 Members | 2,595 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,327 software developers and data experts.

How to create project from c file

Hi,
I have a simple C# in single file. I can compile by using csc. I would like
to create a project/solution for that c# file. How to do that?

Regards
Quang
Dec 21 '05 #1
2 1036
create a c#project in VS2005, then add that file into this project.

--
Vince

Dec 21 '05 #2
If you already have a C# project and you want to add a C file to it,
add it like you would a C# file. To compile I believe you need a flag
before and after your C code to let the compiler know it is compiling C
instead of C#. I think the flag is

extern "C" but I could be wrong. Try looking for information on the
extern flag.

Another solution could be to compile your C code into a DLL and import
the functions you need. I don't know if this would work for what you're
doing. Maybe you can explain your needs a little more.

Also try reading through the discussion here on programming in more
than one language in .NET

http://weblogs.asp.net/dreilly/archi...5/17/7164.aspx

Hope all this helps.

Dec 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Marc Miller | last post: by
3 posts views Thread by moverdear | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.