My Go program uses librdkafka which is a native C library.
Since I work on Windows, I use Cygwin + pkg-config to link with that library.
Since building the program is only possible in Cygwin, I had to link Goland with the Cygwin shell (instead of the default CMD)

It works fine when I run it (Shift + F10), but fails when I debug (Shift + F9)

This is the same error I get when I don't run it in Cygwin but in the default CMD. It's as if the custom shell/terminal configuration doesn't apply in Debug mode.
Any ideas?
The Terminal option in GoLand applies to the builtin terminal, not to the Run Configurations and their execution. As such, changing that option from default to something like PowerShell, cygwin's terminal, or WSL's bash does not have any effect on the compilation of your app.
Please add your cygwin's bin dir to the Windows PATH and then stop the IDE, logoff and then login and start the IDE again. The problem should be resolved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With