How do I get Microsoft Visual Studio Express to Compile C

I have Microsoft Visual Studio Express, and I have the C code, and I can open the C code in MSVE, but I cannot find the option to made the damned program compile the code.

So How do I get the bliping code to compile/build, or whatever the language is to make the computer do what the code I have written tells the computer to do.

I hate programming.

Thanks.

There are six different versions of Visual Studio Express (Visual Web Developer, Visual C#, Visual Basic, Visual C++, Visual SQL Server, and Visual J#). Do you have Visual C++?

In the default keymap, F7 will build the entire project. From the Build menu, there are options for all the various types of compiles available.

I have visual C++, and F7 does nothing.

Also, I have no build menu, only File Edit, View Debug Tools Window Community and Help

I’ve only used Visual Studio (not VSExpress), but you probably need to create a “project” and “solution” for your file. (For large applications, a project might be a directory of related files and a solution would hold all of the projects; here you just have one file in one project in one solution.) Here is how to do it in Visual Studio; if VSE is similar then hopefully you can navigate through the differences.

Try starting Visual Studio and creating a new project (File > New > Project…); if your C program is a command-line sort of program then try “Win32 Console Project” or something like that. Give it a name, and try to make it an empty project. (This might be a checkbox somewhere. In my version, after OKing the project name and type, there is an “Application Settings” tab; make sure “Console Application” and “Empty Project” are checked.)

This will hopefully create a new Now you should have a “Solution Explorer” or similar subwindow, with a tree view listing the projects. There should be only one project, the one you just created. Right-click on the project name and select Add > Add Existing Item… Now select your C source file. (It may make sense to move or copy the source file into the directory to keep all of the code together; but this is not necessary.) It should now show up somewhere within your project tree.

Now hopefully you have a “Build” menu; select “Build Solution” (which used to be F7 but which is now control-shift-B; I don’t know what it is on VSE). The “Output” tab should show the compile and link output; if there are errors they should appear in a task list.

Thanks, that worked, but now it tells me cannot open include file: ‘studio.h’. I must be missing an SDK

Is that studio.h or stdio.h? (I have no idea what “studio.h” is, but stdio.h is the standard C I/O header file. If VSE can’t find that it’s misconfigured.)

What kind of program is this?

You want <stdio.h>, not “studio.h”. The angle-brackets vs. quotes don’t really matter, but the misspelling does. :slight_smile:

stdio, by the way, stands for standard I/O.

VSE comes with little to no library support. I had to install the Microsoft Platform SDK to be able to compile anything remotely useful:
http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en

I don’t know if this is any help, but I’ve got a pretty nice (free) C++ compiler that my college uses. I can direct you to the website for a download if you’d like;

Bloodshed Dev C++

Does that include the standard C libraries? I guess I just assumed those would be part of VSE C++.

I’m almost certain the standard C libraries come with VSE C++. I’m sure Zany will come back and tell us a typo was at fault.

Yup stdio.h makes it work. I looked back at the book, and it said to use stdio.h :smack: :smack: :smack: I thought it meant studio, as in the place an artist keeps all his/her tools.

I’ve lost a day and a half fighting with the damned computer to get the thing to work. I can’t thank you enough, when I took this course I thought it would be Java based, but then I find out it is C. The language isn’t the problem, it is getting the tools to work (Prof: “Just use VSE, it’s intuitively obvious”). You all really helped me. Thank You.