Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Working Implementation of C++11 Threads? [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
wswartzendruber
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1261
Location: Idaho, USA

PostPosted: Sat Nov 12, 2011 2:11 am    Post subject: Working Implementation of C++11 Threads? [SOLVED] Reply with quote

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
View user's profile Send private message
aderesch
Tux's lil' helper
Tux's lil' helper


Joined: 06 Mar 2010
Posts: 123
Location: Hamburg, Germany

PostPosted: Sat Nov 12, 2011 10:28 am    Post subject: Re: Working Implementation of C++11 Threads? Reply with quote

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
View user's profile Send private message
wswartzendruber
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1261
Location: Idaho, USA

PostPosted: Sat Nov 12, 2011 6:25 pm    Post subject: Re: Working Implementation of C++11 Threads? Reply with quote

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! :x
Back to top
View user's profile Send private message
aderesch
Tux's lil' helper
Tux's lil' helper


Joined: 06 Mar 2010
Posts: 123
Location: Hamburg, Germany

PostPosted: Sun Nov 13, 2011 7:53 am    Post subject: Re: Working Implementation of C++11 Threads? Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum