# How do I get Microsoft Visual Studio Express to Compile C

**URL:** <https://boards.straightdope.com/t/how-do-i-get-microsoft-visual-studio-express-to-compile-c/403632>\
**Category:** Factual Questions\
**Created:** [May 11, 2007, 1:05am UTC](https://boards.straightdope.com/t/how-do-i-get-microsoft-visual-studio-express-to-compile-c/403632 "2007-05-11T01:05:44Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zany\_Zeolite\_Zipper](https://avatars.discourse-cdn.com/v4/letter/z/4af34b/32.png) [@Zany\_Zeolite\_Zipper](https://boards.straightdope.com/u/Zany_Zeolite_Zipper)\
**Post date:** [May 11, 2007, 1:05am UTC](https://boards.straightdope.com/t/how-do-i-get-microsoft-visual-studio-express-to-compile-c/403632/1 "2007-05-11T01:05:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Cerowyn](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@Cerowyn](https://boards.straightdope.com/u/Cerowyn)\
**Post date:** [May 11, 2007, 1:12am UTC](https://boards.straightdope.com/t/how-do-i-get-microsoft-visual-studio-express-to-compile-c/403632/2 "2007-05-11T01:12:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Zany\_Zeolite\_Zipper](https://avatars.discourse-cdn.com/v4/letter/z/4af34b/32.png) [@Zany\_Zeolite\_Zipper](https://boards.straightdope.com/u/Zany_Zeolite_Zipper)\
**Post date:** [May 11, 2007, 1:29am UTC](https://boards.straightdope.com/t/how-do-i-get-microsoft-visual-studio-express-to-compile-c/403632/3 "2007-05-11T01:29:13Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![Omphaloskeptic](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@Omphaloskeptic](https://boards.straightdope.com/u/Omphaloskeptic)\
**Post date:** [May 11, 2007, 1:59am UTC](https://boards.straightdope.com/t/how-do-i-get-microsoft-visual-studio-express-to-compile-c/403632/4 "2007-05-11T01:59:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Zany\_Zeolite\_Zipper](https://avatars.discourse-cdn.com/v4/letter/z/4af34b/32.png) [@Zany\_Zeolite\_Zipper](https://boards.straightdope.com/u/Zany_Zeolite_Zipper)\
**Post date:** [May 11, 2007, 2:17am UTC](https://boards.straightdope.com/t/how-do-i-get-microsoft-visual-studio-express-to-compile-c/403632/5 "2007-05-11T02:17:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Omphaloskeptic](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@Omphaloskeptic](https://boards.straightdope.com/u/Omphaloskeptic)\
**Post date:** [May 11, 2007, 2:26am UTC](https://boards.straightdope.com/t/how-do-i-get-microsoft-visual-studio-express-to-compile-c/403632/6 "2007-05-11T02:26:15Z")

</div>

[QUOTE=Zany Zeolite Zipper]  
Thanks, that worked, but now it tells me cannot open include file: ‘studio.h’. I must be missing an SDK  
[/QUOTE]  
Is that st **u** dio.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?

---

<div class="post-metadata">

**Author:** ![Rysto](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@Rysto](https://boards.straightdope.com/u/Rysto)\
**Post date:** [May 11, 2007, 2:26am UTC](https://boards.straightdope.com/t/how-do-i-get-microsoft-visual-studio-express-to-compile-c/403632/7 "2007-05-11T02:26:45Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![jovan](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@jovan](https://boards.straightdope.com/u/jovan)\
**Post date:** [May 11, 2007, 2:43am UTC](https://boards.straightdope.com/t/how-do-i-get-microsoft-visual-studio-express-to-compile-c/403632/8 "2007-05-11T02:43:26Z")

</div>

[QUOTE=Omphaloskeptic]  
Is that st **u** dio.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.)  
[/QUOTE]

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](http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en)

---

<div class="post-metadata">

**Author:** ![H3Knuckles](https://avatars.discourse-cdn.com/v4/letter/h/ba8739/32.png) [@H3Knuckles](https://boards.straightdope.com/u/H3Knuckles)\
**Post date:** [May 11, 2007, 2:49am UTC](https://boards.straightdope.com/t/how-do-i-get-microsoft-visual-studio-express-to-compile-c/403632/9 "2007-05-11T02:49:16Z")

</div>

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++](http://www.bloodshed.net/download.html)

---

<div class="post-metadata">

**Author:** ![Omphaloskeptic](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@Omphaloskeptic](https://boards.straightdope.com/u/Omphaloskeptic)\
**Post date:** [May 11, 2007, 2:54am UTC](https://boards.straightdope.com/t/how-do-i-get-microsoft-visual-studio-express-to-compile-c/403632/10 "2007-05-11T02:54:33Z")

</div>

[QUOTE=jovan]  
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](http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en)  
[/QUOTE]  
Does that include the standard C libraries? I guess I just assumed those would be part of VSE C++.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [May 11, 2007, 2:57am UTC](https://boards.straightdope.com/t/how-do-i-get-microsoft-visual-studio-express-to-compile-c/403632/11 "2007-05-11T02:57:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Zany\_Zeolite\_Zipper](https://avatars.discourse-cdn.com/v4/letter/z/4af34b/32.png) [@Zany\_Zeolite\_Zipper](https://boards.straightdope.com/u/Zany_Zeolite_Zipper)\
**Post date:** [May 11, 2007, 2:58am UTC](https://boards.straightdope.com/t/how-do-i-get-microsoft-visual-studio-express-to-compile-c/403632/12 "2007-05-11T02:58:27Z")

</div>

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.
