Solved

visual c++ simple console application - error

Posted on 1998-07-28
2
160 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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

744 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

17 Experts available now in Live!

Get 1:1 Help Now