error spawning cl.exe

This is a discussion on error spawning cl.exe within the C++ Programming forums, part of the General Programming Boards category; Hello all, I just started using Visual C++ 6.0 today and tried to run a simple program which failed in ...

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    4

    error spawning cl.exe

    Hello all,
    I just started using Visual C++ 6.0 today and tried to run a simple program which failed in the compiler. I googled the error message and got a lot of hits, but no solution I tried works. I've tried 1) making sure cl.exe is in the compilers bin directory, and making sure all required dlls are there. 2)using various ways to compile such as ctrl+f5, and I tried looking for a service pack on Microsoft's web, but with no success. Has anyone else seen this happen? If it matters I use Windows XP Pro, but that shouldn't be a problem should it?

  2. #2
    ___
    Join Date
    Jun 2003
    Posts
    806
    I had problems with VC++ 6 to start with. This is what you do. First uninstall. Delete EVERYTHING. Even the empty folder. Restart. Reinstall. Make sure you have proper .dll's and compile away.
    "When I die I want to pass peacefully in my sleep like my grandfather did, not screaming and yelling like the passengers in his car."

  3. #3
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Try the simplest program possible, if that doesn't work, then reinstall your compiler.
    Code:
    #include <iostream>
    
    int main(int argc, char** argv)
    {
        std::cout << "Hello World!\n";
        return 0;
    }

  4. #4
    ___
    Join Date
    Jun 2003
    Posts
    806
    Code:
    #include <iostream>
    using namespace std;
    
    int main()
    {
    cout<<"Hi";
    return 0;
    {
    Thats simple as it gets.
    "When I die I want to pass peacefully in my sleep like my grandfather did, not screaming and yelling like the passengers in his car."

  5. #5
    Cat
    Cat is offline
    Registered User
    Join Date
    May 2003
    Posts
    1,571
    Make sure, also, that the directory into which you install VC6 is "friendly" -- i.e. it's best to install it into a path which is reasonably short and contains only ANSI characters (i.e. don't use unicode characters or other unusual characters anywhere in the full path).

    Try uninstalling and reinstalling it in a directory that is very very simple, like C:\VC6\ or something.

  6. #6
    Registered User
    Join Date
    Jul 2003
    Posts
    4
    yup, I reinstalled and everything works.
    thanx everybody for helpin out.

    lol, Zakk your 'Hi' program was exactly what I tried to get to run earlier. Pretty scary not to be able to get that to run..

  7. #7
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    If you actually paid for VC++ it should have come with an MSDN library CD. The CD is VERY usefull and has a list of all the error codes and ideas for solving, and or the causes of these errors.

    I personally like VC++ 6.0 just for the IDE interface but on Linux (native OS to me) there are better IDEs and better compilers. For windows, it works great. Umm, if you want a good book on how to use VC++ 6.0 to the extreme try:
    Begining Visual C++ 6.0 by Ivor Horton, he runs through basic C++ and some MFC programming but more importantly the chapter on Debugging and using the IDE is well worth buyin my opinion. Debugging code is so much easier when you have all the tools and know how to use them.

    Oh and not to be rude but just merely to point this out. The "hi" program won't run. Flip the last scope and it will ^_^

    -LC
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  8. #8
    Registered User
    Join Date
    Jul 2003
    Posts
    4
    I'm gonna have a Linux PC up and running soon, what IDE and compilers do you recommend? Also, I know I'm a total beginner and shouldn't get to involved with this right away, but where can I find a good intro to some 2d game programming?

    I'll definitely check out that book you mentioned too.

  9. #9
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    A good IDE for Linux depends on if you use X-Windows or not. I do not but there is a good KDE IDE out there. It comes with the KDE package, its like KDevelop or something. I use Emacs just for the simple Syntax Highlighting. And for compiling I use gcc, and for Debugging I use MANY tools. But you should learn the basics of programming before getting entangled in debugging, after that gdb will suffice. There are more tools out there to find the problems easier but gdb has all the right tools, it just takes awhile to learn.

    KDevelop is what I used when I was using X and it is very similar to MSVC++ so it will be familiar.

    When you start programing on linux remember to get a copy of: Advanced Linux Programming from the link.

    Have fun with Linux

    as for 2d game programing, i know nothing about it. Just OpenGL. Ask the people on the game programming board. But remember, first do the research yourself before asking, and read the faq if they have one. Try Google first, it will probably answer your question before the board will.

    -LC
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  10. #10
    Registered User
    Join Date
    Jul 2003
    Posts
    4
    i remember using the vi editor and gcc a few months ago in Red Hat, but my HD died, so I'll have to refamiliarize myself with that stuff when I get my Linux stuff running again. Now that you mention it, I do remember emacs, I just don't think I ever used it, but I'll give it a shot too.

    thanx for all the good info

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. error cl.exe???
    By student2005 in forum C++ Programming
    Replies: 10
    Last Post: 03-11-2004, 10:03 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21