943,972 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 1159
  • C RSS
Aug 12th, 2007
0

"Build" in VS Express

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
amishosh is offline Offline
59 posts
since Oct 2006
Aug 12th, 2007
0

Re: "Build" in VS Express

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.
Reputation Points: 180
Solved Threads: 34
Posting Whiz
Hamrick is offline Offline
322 posts
since Jun 2007
Aug 12th, 2007
0

Re: "Build" in VS Express

The easiest way for a single file is to type
cl prog.c
at the command prompt.
Team Colleague
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Salem is offline Offline
7,164 posts
since Dec 2005
Aug 12th, 2007
0

Re: "Build" in VS Express

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.
Reputation Points: 47
Solved Threads: 17
Posting Whiz in Training
Tight_Coder_Ex is offline Offline
215 posts
since Feb 2005
Aug 12th, 2007
0

Re: "Build" in VS Express

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.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,953 posts
since Aug 2005
Aug 12th, 2007
0

Re: "Build" in VS Express

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.
Reputation Points: 47
Solved Threads: 17
Posting Whiz in Training
Tight_Coder_Ex is offline Offline
215 posts
since Feb 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: convert int to string
Next Thread in C Forum Timeline: why incompatible warnings in this code?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC