I have a BIG problem!! please help!

This is a discussion on I have a BIG problem!! please help! within the C++ Programming forums, part of the General Programming Boards category; ok, I just installed Bledshed's dev-C++. I open it and then go to source and enter this: #include <iostream> #include ...

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    3

    I have a BIG problem!! please help!

    ok, I just installed Bledshed's dev-C++. I open it and then go to source and enter this:

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

    using namespace std;

    int main()
    {
    cout << "Hello World" << endl;
    system("PAUSE");
    return 0;
    }

    and it says I have an error!! It says "Unable to run program file" and I go to "compile log" and it says 1 error, then right by that under "compile log" it says
    "Compiler: Default compiler
    Executing g++.exe...
    g++.exe "C:\Dev-Cpp\Hello.cpp" -o "C:\Dev-Cpp\Hello.exe" -I"C:\Dev-Cpp" -L"C:\Dev-Cpp\lib"
    Execution terminated".

    So then I tryed it at my friends house and it works fine! I don't get it! someone help me out please. Thanks!

  2. #2
    Registered User
    Join Date
    Oct 2004
    Posts
    120
    You need to install g++. And if it is installed, it needs to be in your path or in a directory already in your path.

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    3
    Quote Originally Posted by pablo615
    You need to install g++. And if it is installed, it needs to be in your path or in a directory already in your path.
    where can I download it?

  4. #4
    C Programmer Stack Overflow's Avatar
    Join Date
    Apr 2004
    Posts
    477
    Hello,

    There are a couple of reasons why Dev-C++ gives this error.

    First things first, you can download g++ for Windows here. Though, in fact, you may already have it.

    Secondly, with a in-depth Google search I found the following information:

    About the "unable to run program file" problem with Dev-C++: I had the same problem when I installed a modified version of Dev-C++ with a wxWidgets framework included. I installed it in "C:\dev-cpp\dev-cpp" instead of "C:\dev-cpp" only. I uninstalled the program and reinstalled it in the correct folder "C:\dev-cpp". From that moment I was unable to use Dev-C++, even if I removed and reinstalled it a lot of times.

    The trick is that Dev-C++ puts 2 files in "C:\documents and settings\<your username>\local settings\application data\". These files are "devcpp.cfg" and "devcpp.ini". Remove Dev-C++, delete these files and reinstall Dev-C++. All should work again.


    - Stack Overflow
    Segmentation Fault: I am an error in which a running program attempts to access memory not allocated to it and core dumps with a segmentation violation error. This is often caused by improper usage of pointers, attempts to access a non-existent or read-only physical memory address, re-use of memory if freed within the same scope, de-referencing a null pointer, or (in C) inadvertently using a non-pointer variable as a pointer.

  5. #5
    Registered User
    Join Date
    Dec 2004
    Posts
    3
    I uninstalled it and re-installed it and it still won't work.

    EDIT: That fixed it! Thanks man!!!!!
    Last edited by Mattiethomas; 12-17-2004 at 08:15 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. big number problem
    By mad_muppet in forum C Programming
    Replies: 11
    Last Post: 08-26-2008, 12:54 AM
  2. Plzzzzz Help Me >>> Big Problem
    By AHMED KHALAF in forum C Programming
    Replies: 2
    Last Post: 12-09-2004, 06:31 AM
  3. [Help] C++ Problem
    By Oxide in forum C++ Programming
    Replies: 3
    Last Post: 10-09-2004, 09:05 PM
  4. half ADT (nested struct) problem...
    By CyC|OpS in forum C Programming
    Replies: 1
    Last Post: 10-26-2002, 08:37 AM
  5. binary tree problem - help needed
    By sanju in forum C Programming
    Replies: 4
    Last Post: 10-16-2002, 05:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21