-
Plain old C in .Net
Sorry about posting this here, couldn't find anywhere more appropriate.
I'm just getting familiar with .net and c#, but now I want to create, compile and run a simple C program from the .Net IDE.
I have created a Win32 Empty App and have entered the test code:
#include <stdio.h>
int main()
{
printf("Hello World\n");
return 0;
}
... and built it fine, but it does not create the .exe for me to run it.
Can anyone offer some help with this? Or better still, point me to a site that actually shows you have to build a C project from .Net IDE, I'm fumbling my way through it at the minute.
Thanks in advance.
-
Re: Plain old C in .Net
VS.NET 03?
To build a C app (as opposed to C++) go into Project -> Properties -> Configuration Properties -> C/C++ -> Advanced and for "Compile As" choose "Compile as C code (/TC)".
It will build in you /Debug or /Release directories depending on which build configuration is active.
-
Re: Plain old C in .Net
Yes, VS.NET 2003.
With this project, Win32 > Application Settings > Empty Project
I don't have the C/C++ menu under Config Properties. :S
If I create a Win32 default project (Not empty) and switch to compile c, it brings up a host of errors due to the printf source.
-
1 Attachment(s)
Re: Plain old C in .Net
are you sure you're doing that exactly as said? cuz thats what I always do to make C project. Are you sure your file's extension is .C ?
do you want to test the file I attached?