Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (go env)?
$ go env
set CGO_CFLAGS=-g -O2
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
What did you do?
The following simple code silently crashes on Windows.
But executes as intended on Linux.
Strangely, if I use printf instead of cout, it runs well on Windows too.
I can mix general C++ code like std::string with printf.
So it seems the static variable such as cout, cerr inside iostream are causing this.
It doesn't exactly silently terminates, if you check the return code it's actually a segmentation fault.
In powershell you can print the last exit code with $LASTEXITCODE
Anyway the main issue here is that go does ASLR builds by default on windows and that sometimes messes up when linking external C/C++ code. So you actually can't do a trival go build on windows when this happens and you instead have to use go build -buildmode=exe to disable ASLR