Solved

compiling simple c++ pgm

Posted on 2003-10-30
12
912 Views
Last Modified: 2010-08-05
Im trying to learn C++ by following sample pgms from a book. But as I compile the pgm, "error spawning c1.exe" message is displayed. This pgm, by the  way, is just a simple 'Hello World' pgm. Please help.
0
Comment
Question by:cyar
  • 3
  • 2
  • 2
  • +3
12 Comments
 
LVL 9

Expert Comment

by:tinchos
ID: 9655136
Please, post your code cyar
0
 

Expert Comment

by:milanygandhi
ID: 9655742
What is the OS and compiler you are using.  And post your code
0
 
LVL 23

Accepted Solution

by:
brettmjohnson earned 50 total points
ID: 9656223
It sounds like you are trying to compile C++ from the command line using the Microsoft compiler.
To do that you must first run vcvars32.bat to set up the appropriate environment variables,
including the search path used to locate the compiler executables.  Unfortunately, vcvars32.bat
is located in the same directory as the compiler, but that directory won't be on the path until
you have run vcvars32.bat.  

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_Set_Environment_Variables.asp

0
 
LVL 17

Expert Comment

by:rstaveley
ID: 9658640
c1.exe isn't something in VC 6 or 7. It looks like a typo for cl.exe (which is the VC command line compiler)... or are you using MinGW?
0
 
LVL 23

Expert Comment

by:brettmjohnson
ID: 9658991
> c1.exe isn't something in VC 6 or 7.

Yes it is.  c1.exe is the first pass of the MSVC/C++ compiler.  cl.exe is a small program that runs
c1.exe, c2.exe, c3.exe [?], and link.  In fact, "cl" stands for "compile and link".
0
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.

 
LVL 17

Expert Comment

by:rstaveley
ID: 9659023
I see c1.dll but not c1.exe. Is that a ye-olde version?
0
 

Expert Comment

by:jbuote1
ID: 9664041
FYI,
I did a google search on c1.exe, and all that came up reffered to Python.

I dont' think your using the right stuff....
In any event, sounds like Paths and environment variables are not set correctly.....
0
 

Expert Comment

by:jbuote1
ID: 9664080
Another Side Note:
Just found c1.exe on my machine, but it appears to be used for Visual J++ as it in my VisualStudio\VJ folder.
0
 
LVL 9

Expert Comment

by:tinchos
ID: 10546335
This question has been classified as abandoned.  I will make a recommendation to the moderators on its resolution in approximately one week.  I would appreciate any comments by the experts that would help me in making a recommendation.

It is assumed that any participant not responding to this request is no longer interested in its final deposition.

If the asker does not know how to close the question, the options are here:
http://www.experts-exchange.com/help.jsp#hs5

Tinchos
EE Cleanup Volunteer
0
 
LVL 9

Expert Comment

by:tinchos
ID: 10586374
No comment has been added lately, so it's time to clean up this question.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: brettmjohnson {http:#9656223}

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0
 
LVL 1

Expert Comment

by:farrooda
ID: 10607183
if you have the program on a CD and you are trying to compile it won't work since a
CD-ROM is read only.
Copy the file to your hard disk and then retry.
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

Suggested Solutions

Title # Comments Views Activity
C++ assignment question 7 171
TCP/IP Socket - connection close results in data lost 14 120
Better understanding on C++ Class serialization and formats 9 61
What is sub-make ? 2 40
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
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 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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

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

26 Experts available now in Live!

Get 1:1 Help Now