cmd/cgo: code using <iostream> header silently terminates on Windows #45468
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Windows
Milestone
Uh oh!
There was an error while loading. Please reload this page.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?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.
The text was updated successfully, but these errors were encountered: