Solved

visual c++ simple console application - error

Posted on 1998-07-28
2
161 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

863 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now