Description / Steps to reproduce the issue
Environment:
- Windows 10 (MSYS_NT-10.0-22621)
- MSYS2 UCRT64
- Verilator 5.048-1
- GCC 16.1.0-5
Installed packages:
mingw-w64-ucrt-x86_64-verilator 5.048-1
mingw-w64-ucrt-x86_64-gcc 16.1.0-5
mingw-w64-ucrt-x86_64-gcc-libs 16.1.0-5
Steps to reproduce:
- Open a UCRT64 shell.
- Create a simple SystemVerilog design and testbench.
- Run:
verilator --binary mealy_0100.sv tbmealy_0100.sv
Observed behavior:
Verilator successfully parses the design, generates C++ sources, and compiles generated C++ files. The failure occurs only during the final executable link stage.
The final link command shown is similar to:
g++ verilated.o verilated_timing.o verilated_threads.o Vmealy_0100__ALL.a -pthread -lpthread -latomic -o Vmealy_0100
The linker then reports multiple undefined references to std::__cxx11::basic_string symbols and exits with an error.
Additional observations:
The following command succeeds:
verilator --cc mealy_0100.sv
This indicates that parsing, elaboration, and C++ generation are functioning correctly.
screenshots:
command: verilator --version
output:

command : g++ --version
output:
Expected behavior
The command
verilator --binary mealy_0100.sv tbmealy_0100.sv
should successfully compile, link, and generate a runnable executable.
Since GCC and the C++ standard library are installed and functioning correctly, Verilator should be able to complete the final linking stage without unresolved C++ standard library symbols.
Actual behavior
The build proceeds through generated C++ compilation but fails during the final executable link stage.
Representative linker errors:
undefined reference to
std::__cxx11::basic_string<char,
std::char_traits,
std::allocator >::basic_string(...)
Multiple similar undefined references are reported.
The build terminates with:
collect2.exe: error: ld returned 1 exit status
Verilator then exits with:
%Error: 'make -C obj_dir -f Vmealy_0100.mk -j 1' exited with 2
on running:
command: verilator --binary mealy_0100.sv tbmealy_0100.sv
output:
Additional diagnosis:
command: pacman -Q mingw-w64-ucrt-x86_64-verilator mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-gcc-libs
output:
command: echo $PATH
output:
command: echo $MSYSTEM
uname -a
ouptut:

Verification
Windows Version
MINGW64_NT-10.0-19045
MINGW environments affected
Are you willing to submit a PR?
not at this time
Description / Steps to reproduce the issue
Environment:
Installed packages:
mingw-w64-ucrt-x86_64-verilator 5.048-1
mingw-w64-ucrt-x86_64-gcc 16.1.0-5
mingw-w64-ucrt-x86_64-gcc-libs 16.1.0-5
Steps to reproduce:
verilator --binary mealy_0100.sv tbmealy_0100.sv
Observed behavior:
Verilator successfully parses the design, generates C++ sources, and compiles generated C++ files. The failure occurs only during the final executable link stage.
The final link command shown is similar to:
g++ verilated.o verilated_timing.o verilated_threads.o Vmealy_0100__ALL.a -pthread -lpthread -latomic -o Vmealy_0100
The linker then reports multiple undefined references to std::__cxx11::basic_string symbols and exits with an error.
Additional observations:
The following command succeeds:
verilator --cc mealy_0100.sv
This indicates that parsing, elaboration, and C++ generation are functioning correctly.
screenshots:

command: verilator --version
output:
command : g++ --version
output:
Expected behavior
The command
verilator --binary mealy_0100.sv tbmealy_0100.sv
should successfully compile, link, and generate a runnable executable.
Since GCC and the C++ standard library are installed and functioning correctly, Verilator should be able to complete the final linking stage without unresolved C++ standard library symbols.
Actual behavior
The build proceeds through generated C++ compilation but fails during the final executable link stage.
Representative linker errors:
undefined reference to
std::__cxx11::basic_string<char,
std::char_traits,
std::allocator >::basic_string(...)
Multiple similar undefined references are reported.
The build terminates with:
collect2.exe: error: ld returned 1 exit status
Verilator then exits with:
%Error: 'make -C obj_dir -f Vmealy_0100.mk -j 1' exited with 2
on running:
command: verilator --binary mealy_0100.sv tbmealy_0100.sv
output:
Additional diagnosis:
command: pacman -Q mingw-w64-ucrt-x86_64-verilator mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-gcc-libs
output:
command: echo $PATH
output:
command: echo $MSYSTEM
uname -a
ouptut:

Verification
Windows Version
MINGW64_NT-10.0-19045
MINGW environments affected
Are you willing to submit a PR?
not at this time