Dev C++ did not compile and ran the following program
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: Dev C++ did not compile and ran the following program

  1. #1
    Join Date
    Feb 2013
    Posts
    5

    Dev C++ did not compile and ran the following program

    //fig.1.4: fig01_04.cpp
    //printing a line with multiple statements
    #include <iostream>

    //function main begins program execution
    int main()
    {
    std::cout << "Welcome ";
    std::cout << "to C++!\n";

    return 0; //indicate that program ended successfully

    } // end function main

    Dev C++ gives following error

    col File message
    internal compile c:\documents and settings\user name\Untitled1.cpp {Error} illegal instruction


    plz help me whats wrong.ok will post this prob in their forum as well.
    Regards

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,229

    Re: Dev C++ did not compile and ran the following program

    I don't use Dev C++, but there's nothing wrong with the code. Compiles in VC++.

  3. #3
    Join Date
    Apr 1999
    Posts
    27,446

    Re: Dev C++ did not compile and ran the following program

    Quote Originally Posted by kfger View Post
    //fig.1.4: fig01_04.cpp
    Dev C++ gives following error
    The compiler you're using is g++, not Dev-C++. Dev-C++ is an IDE around the g++ compiler.
    help me whats wrong.ok will post this prob in their forum as well.
    Dev-C++ has a forum? That IDE hasn't been maintained in years, so unless the author of Dev-C++ has come back to life, you're wasting your time going to a place that doesn't exist.

    If you have a compiler error and you want to report it, go to the Gnu g++ web-site, as they are the compiler authors.

    Regards,

    Paul McKenzie

  4. #4
    Join Date
    Feb 2013
    Posts
    5

    Re: Dev C++ did not compile and ran the following program

    It is dev c++ because when I installed it,it installed an icon on my desktop underneath this icon was written name Dev C++.i also want to inform you that itís the latest version. Version 5.4.0.its forum is
    http://www.bloodshed.net/forum
    In Dev C++ 5.4.0 when I ran the following program
    //comments.cpp
    //demonstrates comments
    #include<iostream>
    using namespace std;
    int main()
    {
    cout << "Every age has a language of its own\n";
    return 0;
    }
    it gave me the following errors

    Line Col File Message
    Internal compile C:\Documents and Set-tings\bgplkjhw34\Desktop\cc1plus.exe [Error] Illegal instruction




    also when I open Dev c++ program.then I clicked on file,then I clicked on source file,when I typed the above program shown in red,then I clicked on compile and run button. Then instead of compiling and running it offered me a save dialog box.instead of compiling and running why did it offered me a save as dialog box.
    and when I clicked save.it started compiling and runnin it and gave me the above mentioned errors.
    plz help me what is wrong.in the old c++ compilers they selected/input input and output libraries.what is the method of doing the same in Dev c++ 5.4.0.
    Any help would be highly appreciated.
    Regards.

  5. #5
    Join Date
    Feb 2013
    Posts
    5

    Re: Dev C++ did not compile and ran the following program

    when you go their help forum which is
    http://www.bloodshed.net/forum
    it goes to
    https://sourceforge.net/account/login.php
    i dont know why.
    my browser is working ok.
    Regards

  6. #6
    Join Date
    Feb 2013
    Posts
    5

    Re: Dev C++ did not compile and ran the following program

    just now i have asked then.waiting for their answers.

  7. #7
    Join Date
    Apr 1999
    Posts
    27,446

    Re: Dev C++ did not compile and ran the following program

    Quote Originally Posted by kfger View Post
    It is dev c++ because when I installed it,it installed an icon on my desktop underneath this icon was written name Dev C++.i also want to inform you that it’s the latest version. Version 5.4.0.its forum is
    http://www.bloodshed.net/forum
    Again, Dev-C++ is not the compiler.

    http://sourceforge.net/projects/orwelldevcpp/

    Please read the Features section. The name of the compiler is MingW, which is a port of gcc/g++. Know your tools. The version of Dev-C++ is not important, it is the version of MingW that is the important factor.

    Your IDE is calling the compiler to compile your source code. The compiler is the one responsible for creating the proper object code.
    Internal compile C:\Documents and Set-tings\bgplkjhw34\Desktop\cc1plus.exe [Error] Illegal instruction
    These are parts of the compiler suite (MingW and g++), not Dev-C++. So you need to identify what is at fault, the compiler installation, or Dev-C++ not issuing the correct command to the compiler to build the project. You could easily find out if you went to the command-line and attempted to compile the program without Dev-C++.

    Regards,

    Paul McKenzie
    Last edited by Paul McKenzie; February 28th, 2013 at 10:59 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center