Try use `em++`: em++ -std=c++11 lambda.cpp

`emcc` is C compiler as like a `clang` and `em++` is C++ compiler as like a `clang++`.


(2014年08月04日 11:33), Jack Wu wrote:
Hello

Since emscripten uses clang as its front-end compiler, so I think it
should support c++11 lambda function.
But when I try to compile this code by -> emcc labda.cpp
|
#include<iostream>
usingnamespacestd;


intmain()
{
intm =0;
intn =0;
[&,n](inta)mutable{m =++n +a;}(4);
    cout <<m <<endl <<n <<endl;
}
|
it tells me error

<https://lh5.googleusercontent.com/-FYxKvANQxgk/U97wp9hzp1I/AAAAAAAAAVk/KRK6WrWjcBA/s1600/2014-08-04_103152.png>

(I am using version 1.21.0 emscripten.)

Any help ?

--
You received this message because you are subscribed to the Google
Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to