Thread: Bloodshed-Dev C++ -- I'm having trouble

  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    7

    Bloodshed-Dev C++ -- I'm having trouble

    Hi all, I'm new

    I followed the Getting Started guide on this site and Downloaded Bloodshed-Dev C++, and began the reading the tutorial. I followed all of the instructions (I think it's out of date =\) and tried to compile and run my first code. I see a window flash and then disappear. Afterwards, a bar raises from the bottom and a message says,

    | Line | File | Message
    | 2 |C:\Dev-Cpp\2 | Unable to run program file.

    I'm using Dev-C++ version 4.9.9.0 and Window's XP HomeEdition on a HP Pavilion 061.

    --Tryce

    P.S. I just found this:

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

    Hope you can help

    Edit- I used the tutorial on this site (www.cprogramming.com) under Started Out section.
    Last edited by Tryce; 09-23-2004 at 02:28 PM.

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    Maybe post a copy of your code? Perhaps the code didn't compile.

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Hmmmm I have Dev-C++ so if you could give me a link to this tutorial that screwed you over. By the way, the P.S portion of your post is actually fine. It shows that your program did compile. Perhaps your compiler is stating that it dislikes HP machines as much as i do.

  4. #4
    Registered User
    Join Date
    Sep 2004
    Posts
    7
    Thanks for the swift reply . Here's the code:

    Code:
    #include <iostream>
    using namespace std;
    int main()
    {
        cout<<"Hey, you, I'm alive! Oh, and Hello World!\n";
        cin.get();
        return 1;
    }
    --Tryce

  5. #5
    Registered User
    Join Date
    Sep 2004
    Posts
    7
    Quote Originally Posted by master5001
    Hmmmm I have Dev-C++ so if you could give me a link to this tutorial that screwed you over. By the way, the P.S portion of your post is actually fine. It shows that your program did compile. Perhaps your compiler is stating that it dislikes HP machines as much as i do.
    http://www.cprogramming.com/tutorial/lesson1.html

    I'll be stuck with this computer for a long time! This program better learn to like HP

  6. #6
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    *sigh* the things I do to help people....MSVC++ was associated to C/C++ files...when I ran Dev-C++ it took the liberty of associating them with it.

    Anyways, yeah man you did things right. The warning was just saying you didn't have a newline at the end of the file (its a unix thing). Now go to Execute->Run to run it.

  7. #7
    Registered User
    Join Date
    Sep 2004
    Posts
    7
    Hi!

    I tried that and this is what happened:

    Me: Execute -> Run

    *pop-up*
    Project is not Compiled

    Me: Execute -> Compile and Run

    | Line | File | Message
    | 2 |C:\Dev-Cpp\2 | Unable to run program file.

    Edit- I also tried just the Compile option. Still no good
    Last edited by Tryce; 09-23-2004 at 02:24 PM. Reason: Plus. . .

  8. #8
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Did you actually put your source code into the project?
    Like "add source file to project"
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  9. #9
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    He doesn't need to do that Salem. But I do wonder if you didn't compile it....You say you did but something isn't right here. Go Execute->Compile then Execute->Run. The thing that gets me is your first post was suggestive of a successful compile.

  10. #10
    Registered User
    Join Date
    Sep 2004
    Posts
    11
    i use Dev-C++ and i had that problem too, make sure that you put the code properly in the proper place or you can use the new source file icon by default the program put this code;

    #include <iostream.h>
    #include <stdlib.h>

    int main ()
    {


    system("pause");
    return 0;
    }
    then you can put your code here and compile it.
    when you have this problem copy your file useing right click then close your project and open new project or click new souce file icon and past your code. These will work i always do this when i have this kind of problem.
    Last edited by ameber; 09-23-2004 at 03:24 PM.

  11. #11
    Registered User
    Join Date
    Sep 2004
    Posts
    36
    I had the exact same problem dude.

    the window appeared and dissappeared. just add

    cin.get();

    before

    return 0;
    Then it will freeze the window.

  12. #12
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Is the file named "2" instead of "2.cpp"?

    gg

  13. #13
    Registered User
    Join Date
    Sep 2004
    Posts
    40
    i had a similar problem. If all you are making is a text display program then don't create it as a project. What you do is go to notepad, dont type in it but save it as watever.cpp then go into dev-c++ and open that file. type in the code and it will run beautifully!another way to do it as mentioned above is just go file>new>source file.also sometimes you'll find that your code still flashes on and off quickly. If this happens, put cin.ignore(); just above cin.get();
    Last edited by pizzapie; 09-24-2004 at 01:33 AM.

  14. #14
    Registered User
    Join Date
    Sep 2004
    Posts
    7
    Hi,

    Did you actually put your source code into the project?
    Like "add source file to project"
    Yes, I went to File --> New --> Source File and clicked it. It was added as Untitled1. I renamed it to "mycode" and entered the code displayed in the tutorial. I read a little more (to the part about compiling the program and running it) and went to Execute --> Compile. That's when I saw the little error message at the bottom of the Dev-C++ compiler.

    But I do wonder if you didn't compile it....You say you did but something isn't right here. Go Execute->Compile then Execute->Run. The thing that gets me is your first post was suggestive of a successful compile.
    I tried again, Execute --> Compile & Run.

    I got the same error message. I then thought, okay, maybe it's already compiled, so I clicked Execute --> Run. A pop-up box told me it wasn't yet compiled.

    i use Dev-C++ and i had that problem too, make sure that you put the code properly in the proper place or you can use the new source file icon by default the program put this code;

    #include <iostream.h>
    #include <stdlib.h>

    int main ()
    {


    system("pause");
    return 0;
    }
    then you can put your code here and compile it.
    when you have this problem copy your file useing right click then close your project and open new project or click new souce file icon and past your code. These will work i always do this when i have this kind of problem.
    I don't understand what you want me to do?

    I had the exact same problem dude.

    the window appeared and dissappeared. just add

    cin.get();

    before

    return 0;
    Then it will freeze the window.
    cin.get() is already in the code, though I do have return 1;.

    I was able to see the window that popped up because of my computer lag this morning. It was the Compile status window, and right before it closed I saw in big bold text, "Done with errors."

    Is the file named "2" instead of "2.cpp"?

    gg
    I named the file "mycode". It saved as "mycode.cpp"

    i had a similar problem. If all you are making is a text display program then don't create it as a project. What you do is go to notepad, dont type in it but save it as watever.cpp then go into dev-c++ and open that file. type in the code and it will run beautifully!another way to do it as mentioned above is just go file>new>source file.also sometimes you'll find that your code still flashes on and off quickly. If this happens, put cin.ignore(); just above cin.get();
    I don't think that worked. I copy+pasted my code into notepad, then I saved it as test3.cpp. I clicked the Open Project or File. . . button and opened it. I tried to run it but it said, Sorce code not compiled. I clicked compile and the "unable to run program file" message came up.

    Shall I take a snapshot?

    --Tryce

  15. #15
    Arggggh DeepFyre's Avatar
    Join Date
    Sep 2004
    Posts
    227
    you have to uninstall dev-cpp and then install it in another directory
    Keyboard Not Found! Press any key to continue. . .

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bloodshed Dev Stops Compiling
    By bengreenwood in forum C++ Programming
    Replies: 4
    Last Post: 11-11-2007, 03:25 PM
  2. bloodshed dev c++ help
    By rocketmanx in forum Game Programming
    Replies: 4
    Last Post: 07-28-2004, 02:57 AM
  3. Sleep on Bloodshed Dev C++
    By BigSter in forum C++ Programming
    Replies: 3
    Last Post: 11-15-2001, 10:17 AM
  4. Wait on Bloodshed Dev C++
    By BigSter in forum C++ Programming
    Replies: 1
    Last Post: 11-14-2001, 03:46 AM
  5. Tutorial about Bloodshed Dev!
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 11-13-2001, 07:42 PM