This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/50196] [C++0x] std::thread not available under macos
- From: "watsonsong at foxmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 27 Aug 2011 14:36:44 +0000
- Subject: [Bug libstdc++/50196] [C++0x] std::thread not available under macos
- Auto-submitted: auto-generated
- References: <bug-50196-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50196
--- Comment #2 from watsonsong <watsonsong at foxmail dot com> 2011-08-27 14:36:44 UTC ---
I use macport to install gcc4.6 on my computer, and I add
-D_GLIBCXX_HAS_GTHREADS flag to g++ and it report errors:
/opt/local/include/gcc46/c++/x86_64-apple-darwin10/bits/c++config.h:159:20:
error: 'NULL' was not declared in this scope
/opt/local/include/gcc46/c++/x86_64-apple-darwin10/bits/c++config.h:159:38:
error: invalid type in declaration bebore ';' token
/opt/local/include/gcc46/c++/mutex:276:52: error: there are no arguments to
'__gthread_mutex_timedlock' that depend on a template parameter, so a
declaration of '__gthread_mutex_timedlock' must be availiable [-fpermissive]
/opt/local/include/gcc46/c++/mutex:383:62: error: there are no arguments to
'__gthread_recursive_mutex_timedlock' that depend on a template parameter, so a
declaration of '__gthread_recursive_mutex_timedlock' must be availiable
[-fpermissive]
It seems can not just define _GLIBCXX_HAS_GTHREADS.