View previous topic :: View next topic |
Author |
Message |
wswartzendruber Veteran
Joined: 23 Mar 2004 Posts: 1261 Location: Idaho, USA
|
Posted: Sat Nov 12, 2011 2:11 am Post subject: Working Implementation of C++11 Threads? [SOLVED] |
|
|
Is there a compiler and runtime out there that has functioning C++11 threads? GCC 4.5's C++ runtime likes to throw exceptions, and I'm not really figuring out why.
Last edited by wswartzendruber on Sat Nov 12, 2011 7:14 pm; edited 1 time in total |
|
Back to top |
|
|
aderesch Tux's lil' helper
Joined: 06 Mar 2010 Posts: 123 Location: Hamburg, Germany
|
Posted: Sat Nov 12, 2011 10:28 am Post subject: Re: Working Implementation of C++11 Threads? |
|
|
wswartzendruber wrote: | Is there a compiler and runtime out there that has functioning C++11 threads? GCC 4.5's C++ runtime likes to throw exceptions, and I'm not really figuring out why. |
A simple test program works fine for me with gcc 4.4, 4.5, and 4.6. Did you pass "-pthread" to g++ or otherwise explicitly link against a supported threading library?
If that's not the problem you should show us the code and compilation flags.
ad |
|
Back to top |
|
|
wswartzendruber Veteran
Joined: 23 Mar 2004 Posts: 1261 Location: Idaho, USA
|
Posted: Sat Nov 12, 2011 6:25 pm Post subject: Re: Working Implementation of C++11 Threads? |
|
|
aderesch wrote: | wswartzendruber wrote: | Is there a compiler and runtime out there that has functioning C++11 threads? GCC 4.5's C++ runtime likes to throw exceptions, and I'm not really figuring out why. |
A simple test program works fine for me with gcc 4.4, 4.5, and 4.6. Did you pass "-pthread" to g++ or otherwise explicitly link against a supported threading library?
If that's not the problem you should show us the code and compilation flags.
ad |
Oh crap, I forgot that. Go figure! |
|
Back to top |
|
|
aderesch Tux's lil' helper
Joined: 06 Mar 2010 Posts: 123 Location: Hamburg, Germany
|
Posted: Sun Nov 13, 2011 7:53 am Post subject: Re: Working Implementation of C++11 Threads? |
|
|
wswartzendruber wrote: | Oh crap, I forgot that. Go figure! :x |
Easy enough to miss, as most of the time a missing library would be a link time failure instead of runtime. Had me searching for quite a while when I first tried it.
ad |
|
Back to top |
|
|
|