Menu

Cannot run program

2009-10-14
2012-09-26
  • Ross Harper

    Ross Harper - 2009-10-14

    Hi all,

    I am new to C progamming and am having trouble in running a program from
    Dev-C++. I have been trying to learn by examining and breaking down example
    programs, but my problem comes when I attempt to compile and run an edited
    program, even when the edit is trivial (adding a letter to a text string)

    I can't seem to add the example code here, but I used the Jackpot program in
    the Examples folder. When I run the original, it worked fine. However, I added
    the letter "t" to the main() function, so that the title read
    " Jackptot game \n". This edit is all I have (consciously) done,
    but it seems enought to stop the program running. Before the edit, I moved the
    original example files to another directory, so that I wouldn't damage to
    originals. The original files still work fine!

    I am using version 4.9.9.2 on Windows XP SP2. The compile log shows

    Compiler: Default compiler

    Building Makefile: "C:\Dev-Cpp\Examples\Jackpot\Makefile.win"

    Executing make...

    make.exe -f "C:\Dev-Cpp\Examples\Jackpot\Makefile.win" all

    make.exe: Nothing to be done for `all'.

    Execution terminated

    Compilation successful

    Any advice or ideas are appreciated.

    Ross

     
  • Wayne Keen

    Wayne Keen - 2009-10-15

    You need to do a "Rebuild Al" and post the log.

     
  • Wayne Keen

    Wayne Keen - 2009-10-15

    Rebuild All that is

    Please do this for a caase in which you are encountering an error

     
  • Ross Harper

    Ross Harper - 2009-10-15

    Hi, thanks for the reply.

    I just tried a "Rebuild All", and the following appears in the
    Compile Log:

    Compiler: Default compiler

    Building Makefile: "C:\Dev-Cpp\Examples\Jackpot\Makefile.win"

    Executing make clean

    rm -f main.o Jackpot.exe

    g++.exe -c main.cpp -o main.o -I"C:/Dev-
    Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-
    Cpp/include/c++/3.4.2/backward" -I"C:/Dev-
    Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2"
    -I"C:/Dev-Cpp/include" -mwindows

    g++.exe main.o -o "Jackpot.exe" -L"C:/Dev-Cpp/lib"
    -mwindows

    Execution terminated

    Compilation successful

    Does this shed any light on things???

    Cheers,

    Ross

     
  • cpns

    cpns - 2009-10-16

    It does.

    Do not build the project in C:\Dev-Cpp\Examples\

    First copy the examples folder elsewhere (not a sub-folder of C:\Dev-Cpp),
    then build the project from there (do a rebuild all initially to clear any
    problems from the earlier attempt).

    It is a strange bug, but for some reason Dev-C++ does not always work
    correctly when projects are created in a subfolder of teh installation folder.
    It is not a good place to build your projects in any case, regardless of the
    bug.

     
  • Ross Harper

    Ross Harper - 2009-10-16

    And I'm away!!!! That's working!

    Thank you very much for the help!!

    Ross

     

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.