This repository contains a simple example of a Golang plugin that can be built as a shared library using the c-shared build mode.
To build the plugin as a shared library, use the following command:
go build -buildmode=c-shared -o example_golang_plugin.dll main.go
This command will create two files:
- example_golang_plugin.dll: The shared library file.
- example_golang_plugin.h: The header file containing the declarations of the exported functions.
Generated Files:
The example_cpp_plugin.go and example_cpp_plugin.h files were generated by a generator located at https://github.com/untrustedmodders/go-lang-module/tree/main/generator.