| | |
compiling .cpp in visual studio
![]() |
•
•
Join Date: Jun 2009
Posts: 29
Reputation:
Solved Threads: 3
Is it possible to compile a single .cpp (not a project) in visual studio 2008? Also will using visual studio cause problems executing code on a unix system?
I am making my first c++ "hello world" program and I am attempting to use visual studios. Am I going to have to make a project for every little thing I program?
It almost seems like a joke to have resource.h, stdafx.h, app.ico, app.rc, AssemblyInfo.cpp, stdafx.cpp, and Hello.cpp just for "hello world" lol.
Thanks for your help and advice on the matter. =)
I am making my first c++ "hello world" program and I am attempting to use visual studios. Am I going to have to make a project for every little thing I program?
It almost seems like a joke to have resource.h, stdafx.h, app.ico, app.rc, AssemblyInfo.cpp, stdafx.cpp, and Hello.cpp just for "hello world" lol.
Thanks for your help and advice on the matter. =)
•
•
Join Date: Mar 2008
Posts: 1,522
Reputation:
Solved Threads: 127
AFAIK, you have to make a project first, and then add the main.cpp file as a source. Unless you want to do it manually using the Visual Studio 2008 command prompt and "cl.exe" to compile.
I need pageviews! most fun profile ever :)
>>Is it possible to compile a single .cpp (not a project) in visual studio 2008
No.
>>Also will using visual studio cause problems executing code on a unix system?
If you mean run the *.exe on *linux, the answer is that it cannot. You will have to compiler it on the machine you want to run it on, in this case a *nix computer. The binaries are not compatible between the two operating systems.
>>It almost seems like a joke to have resource.h, stdafx.h, app.ico, app.rc, AssemblyInfo.cpp, stdafx.cpp, and Hello.cpp just for "hello world" lol.
You can create an empty project and add your own *.cpp file(s) to it.
No.
>>Also will using visual studio cause problems executing code on a unix system?
If you mean run the *.exe on *linux, the answer is that it cannot. You will have to compiler it on the machine you want to run it on, in this case a *nix computer. The binaries are not compatible between the two operating systems.
>>It almost seems like a joke to have resource.h, stdafx.h, app.ico, app.rc, AssemblyInfo.cpp, stdafx.cpp, and Hello.cpp just for "hello world" lol.
You can create an empty project and add your own *.cpp file(s) to it.
Last edited by Ancient Dragon; Sep 1st, 2009 at 7:22 pm.
The most important thing in the Olympic Games is not to win but to take part, just as the most important thing in life is not the triumph but the struggle. The essential thing is not to have conquered but to have fought well.
-Pierre de Coubertin, The Olympic Creed Inspired by Bishop Ethelbert
-Pierre de Coubertin, The Olympic Creed Inspired by Bishop Ethelbert
•
•
Join Date: Mar 2008
Posts: 1,522
Reputation:
Solved Threads: 127
>It almost seems like a joke to have resource.h, stdafx.h, app.ico, app.rc, AssemblyInfo.cpp, stdafx.cpp, and Hello.cpp just for "hello world" lol.
You don't need all those files, when making a new project, remember to choose "Empty Project" in the additional options while in the wizard.
You don't need all those files, when making a new project, remember to choose "Empty Project" in the additional options while in the wizard.
Last edited by William Hemsworth; Sep 1st, 2009 at 7:22 pm.
I need pageviews! most fun profile ever :)
![]() |
Similar Threads
- Compiling C in Visual Studio.NET (C++)
- Compile problems with visual studio 2008 (C++)
- Visual Studio 2008 - error help (C++)
- Receiving error in Visual Studio.Net when compile with F5 (ASP.NET)
- Microsoft visual studio.net 2003 edition (C++)
- template link errors in visual studio .net 2003 (C)
- Visual Studio 6: Initializing static class member (C++)
Other Threads in the C++ Forum
- Previous Thread: Traversing A List for Size Help!
- Next Thread: Error When Using zlib
Views: 1186 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for C++
6 algorithm array arrays assignment beginner binary c++ c++borland c/c++ calculator char class classes code compile compiler constructor conversion convert count delete dll dynamic encryption error file files filestream forms fstream function functions game givemetehcodez graph graphics gui homework iamthwee input int integer lazy link linker list loop loops map math matrix member memory network newbie number object objects opengl operator output parameter pointer pointers problem program programming project qt random read reading recursion recursive reference return server sort spoonfeeding string strings struct student studio template templates text time tree variable vc++ vector video visual win32 window windows winsock wxwidgets






