WebAssembly / wasm-c-api

Wasm C API prototype
Apache License 2.0
534 stars 77 forks source link

make error:error: use of undeclared identifier 'errc' struct is_error_condition_enum<errc> #174

Open lufie0509z opened 2 years ago

lufie0509z commented 2 years ago

make

root@tdevzhang01xinyi1:~/wasm-c-api(master⚡) # make
mkdir -p out/example
clang++ -c -std=c++11 -DWASM_API_DEBUG   -Wall -Werror -ggdb -O -fsanitize=address -I. -Iv8/v8/include -I./include example/hello.cc -o out/example/hello-cc.o
In file included from example/hello.cc:1:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/ios_base.h:46:
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/system_error:60:36: error: use of undeclared identifier 'errc'
    struct is_error_condition_enum<errc>
                                   ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/system_error:139:30: error: unknown type name 'errc'
  error_code make_error_code(errc) noexcept;
                             ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/system_error:204:19: error: unknown type name 'errc'
  make_error_code(errc __e) noexcept
                  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/system_error:220:40: error: unknown type name 'errc'
  error_condition make_error_condition(errc) noexcept;
                                       ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/system_error:278:24: error: unknown type name 'errc'
  make_error_condition(errc __e) noexcept
                       ^
5 errors generated.
Makefile:134: recipe for target 'out/example/hello-cc.o' failed
make: *** [out/example/hello-cc.o] Error 1
lufie0509z commented 2 years ago

System information:

root@tdevzhang01xinyi1:~/wasm-c-api/out/example(master⚡) # uname -a
Linux tdevzhang01xinyi1 4.15.0-158-generic #166-Ubuntu SMP Fri Sep 17 19:37:52 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
root@tdevzhang01xinyi1:~/wasm-c-api/out/example(master⚡) # gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.