Menu

How to compile from command line

2005-11-01
2012-09-26
  • Nobody/Anonymous

    I am a newbie to this. I have Dev-C++ 4.9.9.2 (installed on C:).
    When I try to compile from the command prompt, instead of using the IDE, this is what I get:

    " 'gcc' is not recognized as an internal or external command,
    operable program or batch file."

    I have tried g++ and c++ as command, but all result in the 'not recognized' response.

    So how do I, on XP Home, compile from the command line?

    Thanks in advance for any help.

     
    • Nobody/Anonymous

      Thank you.

       
    • Nobody/Anonymous

      You need to be in the same directory as gcc.exe and/or use an absolute path.

       
    • Anonymous

      Anonymous - 2005-11-02

      Add c:\dev-cpp\bin (or whereever you installed it) to the PATH environment variable.

      Right click My Computer, select Properties->Advanced->Environment variables. Select PATH under "System Variables", click Edit, and at the end of the variable value add ";c:\dev-cpp\bin" (not forgetting the ; separator).

      You need to open a new command line console after doing this, any existing ones will not pick up the new environment.

      Clifford

       

Log in to post a comment.

MongoDB Logo MongoDB