Re: c++0x, std::thread error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi -

You need to enable c++0x on the command line via -std=c++0x.

  Brian

On Thu, Mar 25, 2010 at 2:21 PM, luís <lmsilva@xxxxxx> wrote:
> Hello
> I compiled & installed gcc4.4 using macports.
> When I try to compile:
>
>        #include <thread>
>        ...
>                std::thread t(handle);
>                t.join();
>        ....
> the compiler returns:
>        cserver.cpp: In member function 'int CServer::run()':
>        cserver.cpp:48: error: 'thread' is not a member of 'std'
>        cserver.cpp:48: error: expected ';' before 't'
>        cserver.cpp:49: error: 't' was not declared in this scope
>
> std::cout <<... works fine.
>
> Can anyone help me?
>
> Thanks!
>
>


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux