Solved

visual c++ simple console application - error

Posted on 1998-07-28
2
162 Views
Last Modified: 2010-04-10
Followed 3 separate books - still can't get the simplest Hello World application to compile without errors. Made the project, set all the options (I hope), been teaching C++ for four years.....please help someone. Error msg is "error spawning cl.exe"
0
Comment
Question by:pswift
  • 2
2 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 50 total points
ID: 1168869
cl.exe is the compiler program.  The VC++ IDE (integrated development Environment) runs this seperate program to do the compile.  This sounds like it couldnt  find the compiler.  Is your path set up right?  Is VC++ newly installed?
0
 
LVL 22

Expert Comment

by:nietod
ID: 1168870
If you are running the compiler from the command line (DOS prompt) or from a batch file you need to make sure the path and other environment variables are set correctly.  This is done by running a batchfile called VCVARS32.BAT.  It should be in one of the VC directories.

If you are running the compiler from within the graphical IDE of VC++, then you need to make sure that VC++'s paths are set correctly.  To do this go to "Tools" menu->"Options" item.  In the dialog that appears, select the "Directories" tab.  In "show directories for:" select "executable files".  Then look at the list of directories and make sure that there is one listed for the BIN directory, like "C:\PROGRAM FILES\DEVSTUDIO\VC\BIN"  (You path may need to be different than mine.)
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question