Can it used for arm64?
Closed this issue · 4 comments
jmpews commented
i need it for interactive cli on arm. but it compile errors. such as
λ : make do FINALPACKAGE=1> Making all for tool dumpRuntimeMacho…
==> Compiling lib/linenoise/linenoise.cpp (arm64)…
lib/linenoise/linenoise.cpp:133:12: error: no member named 'unique_ptr' in namespace 'std'
using std::unique_ptr;
~~~~~^
lib/linenoise/linenoise.cpp:422:3: error: use of undeclared identifier 'unique_ptr'
unique_ptr<char[]> text8(new char[len8]);
^
lib/linenoise/linenoise.cpp:422:18: error: expected '(' for function-style cast or type construction
unique_ptr<char[]> text8(new char[len8]);
~~~~^
lib/linenoise/linenoise.cpp:425:19: error: use of undeclared identifier 'text8'
copyString32to8(text8.get(), len8, &count8, text32, len32);
^
lib/linenoise/linenoise.cpp:427:20: error: use of undeclared identifier 'text8'
return write(fd, text8.get(), count8);
thank you.
jsteemann commented
unique_ptr
is a standard component in C++11's memory
header.
So it must be there if you compile it with a C++11-enabled compiler.
Please make sure that you add -std=c++11
to the compiler options when compiling linenoise-ng (or any other means that tells the compiler to compile with C++11 features enabled).
jmpews commented
@jsteemann already add -std=c++11
, I have to find a lot of materials, didn't find a good solution. 😂
jsteemann commented
What kind of compiler and version are you using? Does it support C++11 at all?