Skip to content

Latest commit

 

History

History

cross_call_worker

Example Golang Plugin

This repository contains a simple example of a Golang plugin that can be built as a shared library using the c-shared build mode.

Building the Plugin

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.