Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8779155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:42:50+00:00 2026-06-13T19:42:50+00:00

I installed Clang on Cygwin and I try to compile this code: #include <iostream>

  • 0

I installed Clang on Cygwin and I try to compile this code:

#include <iostream>
int main() {
  std::cout << "hello world!" << std::endl;
  return 0;
}

That works fine if I do clang++ file.cpp. It does not work if I do clang++ file.cpp -std=c++11. I get errors from standard headers like this:

In file included from file.cpp:1:
In file included from /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/iostream:39:
In file included from /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/ostream:39:
In file included from /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/ios:39:
In file included from /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/exception:150:
/usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/exception_ptr.h:132:13: error:
      unknown type name 'type_info'
      const type_info*

Does Cygwin Clang just not work with C++11 turned on, or is there something I can do to get around this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T19:42:51+00:00Added an answer on June 13, 2026 at 7:42 pm

    It looks like a bug in the standard library. exception_ptr.h is only included in C++11 mode, which is why you don’t see it otherwise. The problem is, exactly as the error says, that std::type_info is not declared. It seems GCC magically forward declares certain names in the std namespace which is why it is unaffected! You can prove it yourself with a simple program:

    namespace std {  
    
        class A
        {
        public:
             type_info* B();
        };
    }
    

    This compiles with GCC 4.5.3 but Clang gives an error no matter what the -std setting.

    The problem is fixed in the latest version of GCC so manually updating is probably your best bet. The 4.7.2 release configured with –enable-languages=c,c++ compiles no problem under Cygwin.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I installed Xcode 4.3 and want to test this C++11 program: #include <type_traits> int
I have installed clang and llvm from source, and am trying to compile some
I've just installed clang in to cygwin: clang version 3.1 (trunk 151024) TargetL i386-pc-cygwin
I have installed Clang by using apt-get in Ubuntu, and I can successfully compile
Yesterday I installed clang 3.1 and g++ 4.7 and tried compiling a project I'm
I installed clojure-mode and slime using the emacs starter kit and I get this
Installed Visual Studio Web Developer 2010 Express from the ISO available from this page:
I installed gcc 4.2. 4.3, 4.4, I installed clang, and nothing: every time I
I am trying out initializing lists feature in C++11 using clang installed by MacPorts.
In my box we have GCC 4.1.2 installed as root user but to compile

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.