Cant compile single c++ file

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2008
Posts: 9
Reputation: StephanJos has a little shameless behaviour in the past 
Solved Threads: 0
StephanJos StephanJos is offline Offline
Newbie Poster

Cant compile single c++ file

 
0
  #1
Oct 24th, 2008
I have one *.cpp file but I cant it compile with MS VC++ ! How to compile signle .cpp file in VC++? Please help me!
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 35
Reputation: Evan M is an unknown quantity at this point 
Solved Threads: 4
Evan M's Avatar
Evan M Evan M is offline Offline
Light Poster

Re: Cant compile single c++ file

 
0
  #2
Oct 24th, 2008
Under "Build", click "Build Solution", or just hit F7.

If there is no "Build" in the menu, then you need to create a project first. Click File->New->Project.
Last edited by Evan M; Oct 24th, 2008 at 2:42 pm.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 9
Reputation: StephanJos has a little shameless behaviour in the past 
Solved Threads: 0
StephanJos StephanJos is offline Offline
Newbie Poster

Re: Cant compile single c++ file

 
0
  #3
Oct 24th, 2008
what project if I need single file (consule aplication)
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,917
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 274
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: Cant compile single c++ file

 
0
  #4
Oct 24th, 2008
You can work with a single file but it has to be in a project.
Why is that? You probably ask. Well you might add some other files later(resources, databasefiles, etc.) if you stay with one file OK, but it's handy if you have more files to keep them in one project.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 9
Reputation: StephanJos has a little shameless behaviour in the past 
Solved Threads: 0
StephanJos StephanJos is offline Offline
Newbie Poster

Re: Cant compile single c++ file

 
0
  #5
Oct 24th, 2008
What project I need to create for simple c++ consule program?
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,917
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 274
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: Cant compile single c++ file

 
0
  #6
Oct 24th, 2008
Select the "File" menu and select "New Project...".
A window opens.
Under the many options select Console Application.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 35
Reputation: Evan M is an unknown quantity at this point 
Solved Threads: 4
Evan M's Avatar
Evan M Evan M is offline Offline
Light Poster

Re: Cant compile single c++ file

 
0
  #7
Oct 24th, 2008
Win32 Console Application.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 9
Reputation: StephanJos has a little shameless behaviour in the past 
Solved Threads: 0
StephanJos StephanJos is offline Offline
Newbie Poster

Re: Cant compile single c++ file

 
0
  #8
Oct 24th, 2008
I created project but it shows:
->header files:
stdafx.h
targetver.h
->Source files:
stdafx.cpp
test2.cpp


Why so many files in project if I need compile 1 file and I dont need that files.. And I donkt know where to write my code in that stupid project..How can then I compile
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 35
Reputation: Evan M is an unknown quantity at this point 
Solved Threads: 4
Evan M's Avatar
Evan M Evan M is offline Offline
Light Poster

Re: Cant compile single c++ file

 
0
  #9
Oct 24th, 2008
After creating the Win32 Console Application project, there should be a window that says "Win32 Application Wizard". Click "next" and click the "Empty Project" checkbox.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 9
Reputation: StephanJos has a little shameless behaviour in the past 
Solved Threads: 0
StephanJos StephanJos is offline Offline
Newbie Poster

Re: Cant compile single c++ file

 
0
  #10
Oct 24th, 2008
Thank you!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC