GCC 15.1 : print fail
Jonathan Wakely
jwakely.gcc@gmail.com
Mon Jun 23 09:04:30 GMT 2025
On Mon, 23 Jun 2025 at 09:52, LIU Hao via Gcc-help <gcc-help@gcc.gnu.org> wrote:
>
> 在 2025-6-23 16:15, Luc ROLLAND via Gcc-help 写道:
> > Hello
> > I'm using MinGW installed on Windows 10 Pro via MSYS2.
> > g++ --version returns: 'g++.exe (Rev5, Built by MSYS2 project) 15.1.0'
> > gdb --version returns: 'GNU gdb (GDB) 16.3'
> > I'm learning C++23, and when I write:
> > #include <iostream>
> > #include <print>
> > int main() {
> > std::print("Hello, World!\n");
> > return 0;
> > }
> > In Code::Blocks 25.3, when I start the compilation I obtain:
>
> Using experimental features requires linking with `-lstdc++exp`:
>
>
> https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dynamic_or_shared.html#manual.intro.using.linkage.experimental
The specific case of needing -lstdc++exp for std::print on Windows is
also documented at https://gcc.gnu.org/gcc-14/changes.html#libstdcxx
More information about the Gcc-help
mailing list