mathstuf / cxx-modules-sandbox

Sandbox repository for various C++20 Modules use cases and how to build them
Apache License 2.0
62 stars 8 forks source link

Error: ‘import’ does not name a type; did you mean ‘short’? #23

Closed Lotte1990 closed 2 years ago

Lotte1990 commented 4 years ago

I'm getting the following error:

error: ‘import’ does not name a type; did you mean ‘short’?

What am I doing wrong?

Ubuntu 18.04 CMake 3.17.0 GCC 7.5.0

Warchant commented 4 years ago

You're using wrong compiler. https://en.cppreference.com/w/cpp/compiler_support Modules feature is not even in gcc10

johan-boule commented 4 years ago

Please try with the docker branch of this repository: it contains compilers with module support.