Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Does a file have to have a corresponding project associated with i

0 views
Skip to first unread message

BigDaddyCool

unread,
Jan 4, 2009, 2:41:01 PM1/4/09
to
For example, if I'm in Visual C++ 2008 and I go to File --> New --> File...
and I click on Visual C++ and click on "C++ File (.cpp)", that creates a new
.cpp file called Source1.cpp. If I start typing in some code, is there any
way to get this code to compile and run or do I have to start a new project?

Mark Salsbery [MVP]

unread,
Jan 4, 2009, 3:47:18 PM1/4/09
to
"BigDaddyCool" <BigDad...@discussions.microsoft.com> wrote in message
news:D5D9A273-F162-4904...@microsoft.com...


The project file has all the compiler and linker options.

If you try it, you'll see there's no build options available for the
stand-alone file.
You would need to compile from the command line.

Mark

--
Mark Salsbery
Microsoft MVP - Visual C++

BigDaddyCool

unread,
Jan 4, 2009, 4:51:01 PM1/4/09
to
And how do I compile from the command line in Visual C++ 2008?

Armin Zingler

unread,
Jan 4, 2009, 7:16:19 PM1/4/09
to
BigDaddyCool wrote:
> And how do I compile from the command line in Visual C++ 2008?


http://msdn.microsoft.com/en-us/library/ms235431.aspx

http://msdn.microsoft.com/en-us/library/bb384838.aspx


Armin

H Brydon

unread,
Mar 26, 2009, 10:41:59 PM3/26/09
to

"Mark Salsbery [MVP]" <MarkSalsbery[MVP]@newsgroup.nospam> wrote in message
news:OAi5t2qb...@TK2MSFTNGP03.phx.gbl...

NOT TRUE! You do not need to compile from the command line. You can add the
source file to the project and it will compile just fine.

To do this, right click on the project, and select "Add existing" ... follow
the prompts.

Ben Voigt [C++ MVP]

unread,
Apr 20, 2009, 5:49:25 PM4/20/09
to
> NOT TRUE! You do not need to compile from the command line. You can add
> the source file to the project and it will compile just fine.
>
> To do this, right click on the project, and select "Add existing" ...
> follow the prompts.

I think you missed the point, which was how to compile a file without having
a project...

Allen

unread,
Jul 8, 2009, 6:58:12 PM7/8/09
to
You said: I think you missed the point, which was how to compile a file
without having
a project...

You can select "Empty Project. " from the template

--
Thanks
Allen
"Ben Voigt [C++ MVP]" <r...@nospam.nospam> wrote in message
news:19E6C8E6-2970-44AF...@microsoft.com...

0 new messages