Menu

Windows Vista

2008-06-15
2012-09-26
  • Gurpreet Pahwa

    Gurpreet Pahwa - 2008-06-15

    Hello All:

    Today, I am into my first day of programming and started with the basic stuff using "C For Dummies". I downloaded devcpp-4.9.9.2_setup and installed on my system.

    As per the book now, I am trying the following in the command prompt: "copy con gcc.bat" and pressing enter to complete the command with "@Dev-Cpp\bin\gcc %1 %2 %3 %4 %5 %6". Now once I do this, command prompt reads "Access is denied. 0 files copied."

    Not sure why this is happening. My first guess is that I am using Windows Vista. Is there a way for me to start with this? Please suggest a solution in simple words.

    Thanks,

    Gurpreet

     
    • cpns

      cpns - 2008-06-15

      You have to wonder about that book and the author's grasp of computing! I have never heard anything quite so ludicrous.

      All it is trying to get you to do is create a batch file so you can run gcc from the command line. Now first of all you don't need to run it form the command line since that is what Dev-C++ does for you, and secondly that is not the best way to do it. That is not even teh best way to create a batch file since you could just use Notepad or even Dev-C++ itself!

      Now there is also a problem with Vista, and the solution is linked to in the "PLEASE READ BEFORE POSTING A QUESTION" thread.

      The better way to configure your system to allow you to run the tools from the command line (which presumably the books uses at some point), is to set the PATH environment variable. See: http://banagale.com/changing-your-system-path-in-windows-vista.htm . The path you need to add is c:\dev-cpp\bin

      You should then find that anything in the book that runs gcc from the command line works correctly (and far more reliably than that frankly dodgy batch file, which will only work if the current working directory happens to be c:\ - which is a really bad place to develop your code - and if your gcc command has fewer than 6 arguments, which is not very many for doing anything significant.

      Clifford

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.