Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   Compiling .cpp file using Microsft Visual Studio 2005 (http://www.programmingforums.org/showthread.php?t=9063)

sharadpro Mar 27th, 2006 8:30 AM

Compiling .cpp file using Microsft Visual Studio 2005
 
Can anyone pls tell me how to compile n build a single .CPP file<program>
using Microsoft Visual Studio 2005 <Express Edition>without creating a project n solution as is possible in Visual Studio 6.
When I make a .CPP file in Visual Studio 05, there is no option to build or compile the program until I make a project , while in VS 6 , one can complie a single a .CPP file.

DaWei Mar 27th, 2006 8:35 AM

This is my experience (possibly I haven't exhaused all measures): one can make a source file without a project, but one cannot build it. Incidentally, .cpp files are C++ files, so this should be in that forum.

DaWei Mar 27th, 2006 8:37 AM

See my answer under your post in the C forum. Please don't cross-post. Please DO read the forum's rules/FAQ and a "How to Post" thread (always a good move for a new member in a community).

nnxion Mar 27th, 2006 8:38 AM

You cannot do that anymore. You can do that with some other IDE like Dev-C++ though. You can also just compile a native C++ program from the command line.

Polyphemus_ Mar 27th, 2006 8:38 AM

Please do not crosspost. AFAIK, there is no such option. A solution is, I use this one, to create a project you use for only one or two files. You add the file to the project, you compile it, and you exclude it from your project again.

DaWei Mar 27th, 2006 8:43 AM

I have an "examples" project. I just move stuff in and out of it.

nnxion Mar 27th, 2006 8:48 AM

Quote:

Originally Posted by DaWei
I have an "examples" project. I just move stuff in and out of it.

Hehe I have that too, except I have one for console, and another for win32 projects.

sharadpro Mar 27th, 2006 9:05 AM

When I make an empty project n compile a single file , it is fine but when I add program to it
Error on build ::
error LNK2005: _main already defined
How to solve this?

DaWei Mar 27th, 2006 9:58 AM

First guess: two source files in the project, both with a "main." I think my crystal needs new 'ball' joints....

Seif Mar 27th, 2006 10:07 AM

Thought you only just got them changed? ;)


All times are GMT -5. The time now is 12:06 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC