Can't use std::thread with CDT and MinGW [message #778436] |
Thu, 12 January 2012 08:13 |
Eclipse User |
|
|
|
I am wanting to use std::thread with my Eclipse Indigo and MinGW (gcc 4.6.2)
combination on Windows 7 but it reports that thread is not a member of std.
I have included <thread> but what else do I need to do to have std::thread
as a
usable class?
--
Regards,
Jarrick
|
|
|
|
Re: Can't use std::thread with CDT and MinGW [message #778554 is a reply to message #778551] |
Fri, 13 January 2012 09:02 |
Eclipse User |
|
|
|
"Axel Mueller" wrote in message news:jeoq89$64k$1@news.eclipse.org...
> A quick search in this forum :x
> http://www.eclipse.org/forums/index.php/m/775651/?srch=std%3A%3Athread#msg_775651
Thanks but it's a pity that your link points back to another of my own posts
on the subject.
Someone else has pointed out how to define the symbol in my original
question but the class std::thread is still not visible because of other
symbols not being defined. I have posted about this 3 times now and the
first two times I requested help in having that original symbol defined. In
my most recent post I did not refer to that symbol anymore because I now
know how to define it; the problem is simply that I still cannot use
std::thread.
So, does anyone know how I can use std::thread? The other symbols which are
not defined probably mean that other dependencies are not met in this
configuration so I really need to hear from someone who has either managed
to use this class or can explain why I cannot use it.
--
Regards,
Jarrick
|
|
|
|
Re: Can't use std::thread with CDT and MinGW [message #778576 is a reply to message #778570] |
Fri, 13 January 2012 10:29 |
Eclipse User |
|
|
|
"Rob Lorimer" wrote in message news:jeovsj$h5d$1@news.eclipse.org...
> I responded to one of your original posts stating that you should include
> support for c++0x (c++11) by using the -std=gnu++0x flag.
>
> You should do this in two places i.e. once for discovery (my previous
> answer)
> so that eclipse codan works correctly and second for the compiler flags so
> the compiler will work.
> It's all down to using -std==gnu++0x as std::thread is part of the newer
> c++
> features. Inclusion of this flag creates the symbols that you need rather
> than
> entering the symbols manually (as you'll likely miss some).
Thanks Rob but I must be missing something as it still doesn't work.
I have added that flag to Discovery Options->Compiler invocation arguments
and also to Settings->GCC C++ Compiler->Miscellaneous->Other flags as well
as rebuilding the index and rebuilding the project but any reference to
std::thread is still in red and I get this compiler error:
'thread' is not a member of 'std'
Are you sure you are able to actually use std::thread with this flag and/or
is there something else that I am supposed to be doing?
--
Regards,
Jarrick
|
|
|
|
Powered by
FUDForum. Page generated in 0.02686 seconds