0

Hi!
Is there a way that I can "Build" a single source file? Wihout creating a project? I want to be able to open a *.c file in Visual Studio and simply Build it with out having to choose a project. I know it's a whole different world but in Borland C for DOS I simly opened a file and hit Ctrl+F9.

Thanks.

5
Contributors
5
Replies
6
Views
10 Years
Discussion Span
Last Post by Tight_Coder_Ex
0

I don't think you can build just an open file. But you can make a dummy project and get the same effect by removing the source files in the project and adding existing items instead of new items to it each time.

0

When you open a single file in Visual Studio (VC 6.0++), what it will ask if you want to open an project workspace. That is just something it needs internally and doesn't actually create a project. Just click on yes and you can compile a single file.

0

The way I do it is somewhat like Hamrick suggested -- create a project then change the source file(s) as needed. I test out many of the programs posted on the C and C++ boards that way.

0

The way I do it is somewhat like Hamrick suggested -- create a project then change the source file(s) as needed. I test out many of the programs posted on the C and C++ boards that way.

I kind of overlooked the fact that maybe you want to run the app in some way. My method only compiles the file, nothing else.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.