0

I'm running Debian 9 on WSL 2 and I'm trying to compile C++ code that uses the <charconv> header. I have the line set(CMAKE_CXX_STANDARD 17) in my Cmake file so it's definitely using C++ 17 but when I compile it I get this error message

In file included from /mnt/d/blang/frontend/Token.cc:5:0:
/mnt/d/blang/frontend/Token.h:11:20: fatal error: charconv: No such file or directory
 #include <charconv>

I build GCC 12 from source and installed it. When I run gcc -v I get this.

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/12.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ./configure --disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.1.0 (GCC) 

How do I fix this?

ishaangupte
  • 248
  • 2
  • 11

0 Answers0