VS.NET 2003 and C programs
I'm a newbie to C and VS.NET so please bear with me. I am an experience programmer in VB, VBA, VBScript, ASP, HTML and a few other things.
Anyway, I'm trying to figure out how to create and compile a C program in VS.NET 2003. I think I figured out how to create a C source code file:
Click File, New, File
Under Categories, select Visual C++, select C++ File, click Open
Click File, Save As, change Save As Type to C Source File and then name and save the file.
At this point, I have a "test.c" file open in VS.NET where I can enter my code, but I can't find a way to compile the source file. I found a command line compiler, but is that the only way? I figured there would be a compile function available within the IDE for this.
1. Did I create a C file correctly?
2. How do I compile within the IDE?
actually, all you need to do, is go to make a new .cpp file, and instead of keeping the default .cpp extension, just make it .c, and presto you are in the world of C programming.
Everything else works the same, the compiler will now complain about new things you never knew could be problems, and not a thing at all about other problems. Have fun! (It's really not that bad)
Right-click on the toolbar and enable "Build". The toolbar icons to compile look a little like small birthday cakes. You can also use the "Build" menu or F7 to build the entire solution.
If you can't find any of them, try creating a new project, then adding your .c file to that (File->New->Project)
Last edited by hdood; 09-29-2004 at 05:58 AM.
I also curious about this one...
How do I run the app from inside the IDE, like VCSPAWN.exe for VC++ 6?? I've searched the tool bars but can't find the button...
charlesmarshall, you have to create new project if you want to compile your source.
1. From menu "File/New/Project"
2. Select "Visual C++ Projects/Win32/Win32 Console Project"
3. Type project name and directory and press OK
4. Go to "Application Settings", select "Empty Project" and press Finish
5. From menu "File/Add New Item..."
6. Select "C++ File", type filename (remember ".c") and press Open
and that's it, new project in just 6 steps
1. From menu "Tools/Customize"
Originally Posted by xErath
2. Go to commands page and choose "Debug" from Categories section
3. Find "Start Without Debugging" from Commands section and drag it to wherever you want
OK. I created a new project and a new c file. I also can successfully select Build Solution from the Build menu. But an executable isn't created. I've searched my hard drive and can't find it. Also, when I click Debug, Start without Debugging, it says it can't find myprogram.exe in the debug folder where it's looking for it. Am I doing something wrong?
1. Please make sure you have selected release from the drop down menu:
Originally Posted by charlesmarshall
2. The location of this .exe will be in the my documents>Visual Studio Projects>Your project name, folder.
All you should have to do is "build<application name>" and then go to debug>Start without debugging, and then the program should start.
If you need any other help please just let me know.
Last edited by neoborn; 09-30-2004 at 06:02 AM.