I built my .so file:
go build -buildmode=plugin -o test.so
and run debug with Goland, then I get the error:
Error running agent: could not initialize input inputs.plugin_input: plugin.Open("./plugins_lib/test1"): plugin was built with a different version of package runtime/internal/sys
But I can build my main program in my terminal and it will work well.
The plugin should be compiled with the same flags as the main application.
If the application is compiled using the IDE already, then add the -gcflags="all=-N -l"
to the above go build ...
command.
go build -buildmode=plugin -gcflags="all=-N -l" -o test.so
In addition,if the IDE is Goland, the build command of the main application can be found at the debug console of Goland.
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