Linkage error using STD on Windows GCC 15.2.0

1 day ago 4
ARTICLE AD BOX

I follow How to use module `std` with gcc to generate "gcm.cache/std.gcm" on Windows using GCC 15.2.0 and ran g++ -std=c++23 -fmodules -fsearch-include-path -c bits/std.cc at "C:\bak\MinGW\include\c++\15.2.0". I got (I'm showing only a part):

C:/bak/MinGW/x86_64-w64-mingw32/include/wchar.h:584:5: note: 'int vwscanf(const wchar_t*, char*)' declared here with internal linkage 584 | int vwscanf(const wchar_t *__format, __builtin_va_list __local_argv) | ^~~~~~~ ./bits/std.cc:4000:14: error: exporting 'int wprintf(const wchar_t*, ...)' that does not have external linkage 4000 | using std::wprintf; | ^~~~~~~ C:/bak/MinGW/x86_64-w64-mingw32/include/wchar.h:612:5: note: 'int wprintf(const wchar_t*, ...)' declared here with internal linkage 612 | int wprintf (const wchar_t *__format, ...) | ^~~~~~~ ./bits/std.cc:4001:14: error: exporting 'int wscanf(const wchar_t*, ...)' that d oes not have external linkage 4001 | using std::wscanf; | ^~~~~~ C:/bak/MinGW/x86_64-w64-mingw32/include/wchar.h:554:5: note: 'int wscanf(const w char_t*, ...)' declared here with internal linkage 554 | int wscanf(const wchar_t *__format, ...) | ^~~~~~
Read Entire Article