You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stacktrace and text_encoding are not enabled by default.
PS > g++ -std=c++26 -x c++ - -lstdc++exp
#include <stacktrace>
#include <text_encoding>
int main()
{
std::stacktrace::current();
std::text_encoding::environment();
}
^Z
<stdin>: In function 'int main()':
<stdin>:6:10: error: 'std::stacktrace' has not been declared
<stdin>:7:10: error: 'std::text_encoding' has not been declared
If I force enable them, I will get link errors.
PS > g++ -std=c++26 -x c++ - -lstdc++exp
#define __cpp_lib_stacktrace
#define __cpp_lib_text_encoding
#include <stacktrace>
#include <text_encoding>
int main()
{
std::stacktrace::current();
std::text_encoding::environment();
}
^Z
.../mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\...\AppData\Local\Temp\ccuMXIMp.o:<stdin>:(.text+0x3f): undefined reference to `std::text_encoding::environment()'
.../mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\...\AppData\Local\Temp\ccuMXIMp.o:<stdin>:(.text$_ZNSt16basic_stacktraceISaISt16stacktrace_entryEE7currentERKS1_[_ZNSt16basic_stacktraceISaISt16stacktrace_entryEE7currentERKS1_]+0x59): undefined reference to `std::__stacktrace_impl::_S_current(int (*)(void*, unsigned long long), void*, int)'
collect2.exe: error: ld returned 1 exit status
The error is caused by the lack of related functions in libstdc++exp.a.
PS > nm .\mingw64\lib\libstdc++exp.a | sls 'stacktrace.o|text_encoding.o' -Context 0, 5
> stacktrace.o:
0000000000000000 b .bss
0000000000000000 d .data
0000000000000000 r .rdata$zzz
0000000000000000 t .text
> text_encoding.o:
0000000000000000 b .bss
0000000000000000 d .data
0000000000000000 r .rdata$zzz
0000000000000000 t .text
time zone & locale
std::chrono::current_zone() from libstdc++ always returns UTC, while its C-style equivalent std::localtime from ucrt/msvcrt works correctly.
stacktrace
&text_encoding
stacktrace
andtext_encoding
are not enabled by default.If I force enable them, I will get link errors.
The error is caused by the lack of related functions in
libstdc++exp.a
.time zone
&locale
std::chrono::current_zone()
fromlibstdc++
always returnsUTC
, while its C-style equivalentstd::localtime
fromucrt/msvcrt
works correctly.std::locale
fromlibstdc++
only acceptsnullptr
,C
andPOSIX
, while its C-style equivalentstd::setlocale
fromucrt/msvcrt
works correctly.Linux side status
All these features work correctly on Linux side. These issues are MinGW-only.
The text was updated successfully, but these errors were encountered: