Thread: G++ compiler's error message

  1. #1
    Krem
    Guest

    G++ compiler's error message

    Hi everyone,
    I have just reached to this website thru a search.
    I have a question for u guys.
    I have a compile message for the code below:
    #include <iostream>
    #include <string>
    using namespace std;

    int main()
    {
    bool Test = true;
    string messg = "Hello World";

    if (Test)
    cout<<messg;
    return 0;
    }
    When I compiler this code with G++ under UNIX, it
    gave an error message-"unsupported architecture"
    Is that g++ compiler does not support for Standard
    C++ or something? Can anyone explain why?
    Thanx!
    Krem

  2. #2
    Registered User Dr. Bebop's Avatar
    Join Date
    Sep 2002
    Posts
    96
    I guess G++ is supposed to work under Unix, but is the version you have compatible with the latest standard for C++? Try this and see if it works for you.
    Code:
    #include <iostream.h>
    
    int main()
    { 
            bool Test = true; 
            char *messg = "Hello World";
            
            if (Test)
                    cout<<messg;
            return 0;
    }
    Processing error: Stupidity detected.
    ------------------------------
    Dr. Bebop
    Windows XP Professional Ed.
    Microsoft Visual Studio 6

  3. #3
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    This belongs in the C++ board.
    The world is waiting. I must leave you now.

  4. #4
    Krem
    Guest
    Originally posted by Dr. Bebop
    I guess G++ is supposed to work under Unix, but is the version you have compatible with the latest standard for C++? Try this and see if it works for you.
    Code:
    #include <iostream.h>
    
    int main()
    { 
            bool Test = true; 
            char *messg = "Hello World";
            
            if (Test)
                    cout<<messg;
            return 0;
    }
    What the lastest version of G++ comipler support
    C++ standard do you know?
    Also, im sorry for wrong place this first time.
    Krem

  5. #5
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>What the lastest version of G++ comipler support
    >>C++ standard do you know?
    http://gcc.gnu.org/
    But like Salem said, make sure that the flavour of Unix you are running this on is actually supported.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ Builder Comparison
    By ryanlcs in forum Tech Board
    Replies: 14
    Last Post: 08-20-2006, 09:56 AM
  2. Is It Possible To Install Multiple Compilers?
    By mishna_toreh in forum C Programming
    Replies: 3
    Last Post: 05-13-2005, 07:32 AM
  3. Compilers for Windows
    By LegendsEnd in forum Windows Programming
    Replies: 2
    Last Post: 03-26-2004, 08:03 AM
  4. small compilers?
    By Korn1699 in forum C++ Programming
    Replies: 2
    Last Post: 06-22-2003, 05:58 PM
  5. Compilers, Compilers, Compilers
    By Stan100 in forum C++ Programming
    Replies: 11
    Last Post: 11-08-2002, 04:21 PM