Menu

Trouble running basic console app

2009-04-20
2012-09-26
  • Tom English

    Tom English - 2009-04-20

    Hi,

    I'm just beginning to learn how to use Dev-C++ and I've run into a problem compiling the basic console application that appears when you start a new console project.

    I am running version 4.9.7.0 of Dev-C++ on a 64-bit Windows Vista Machine.

    Here is the code:

    include <iostream>

    include <stdlib.h>

    int main(int argc, char *argv[])
    {

    system("PAUSE");
    return 0;
    }

    As you can see, it is just the basic starter code.
    Now, when I compile it, I get the following error:

    Building Makefile: "C:\Dev-Cpp work\Makefile.win"
    Executing make...
    make.exe -f "C:\Dev-Cpp work\Makefile.win" all
    Execution terminated

    Also, I have the following directories Added to the "C++ Includes" tap under the compiler options:
    C:\Dev-Cpp\include
    C:\Dev-Cpp\include\c++

    Anyone got any advice?

    Note: I am running the version of Dev-C++ that came with the book C++ for Dummies. I know its a little outdated, but the book is geared toward working with that version, so I'm reluctant to upgrade. Would this help?

     
    • Gary Clayson

      Gary Clayson - 2009-04-21

      Hello. If you still have problems with the makefile. Receive this message again:
      Building Makefile: "C:\Dev-Cpp work\Makefile.win"
      Executing make...
      make.exe -f "C:\Dev-Cpp work\Makefile.win" all
      Execution terminated

      The workaround I use is (1) to save all files, (2) exit Dev-Cpp, (3) delete the Dev-Cpp generated makefile, and (4) restart the Dev-Cpp.
      Dev-Cpp will generate a new makefile. Your project should now compile and run!

       
    • Tom English

      Tom English - 2009-04-20

      Never mind, I decided to upgrade on my own and it now works fine. Sorry for wasting your time if you read all that.

       

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.