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

  • Thread starter Thread starter BigDaddyCool
  • Start date Start date
B

BigDaddyCool

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?
 
BigDaddyCool said:
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?


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 said:
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

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.
 
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...
 
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
 
Back
Top