{"id":17918606,"url":"https://github.com/ollevche/goshlib","last_synced_at":"2026-01-16T00:46:18.431Z","repository":{"id":101917088,"uuid":"310610073","full_name":"ollevche/goshlib","owner":"ollevche","description":"How to build a shared library (.dll) in Go for Windows on Ubuntu?","archived":false,"fork":false,"pushed_at":"2020-11-06T18:41:59.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T21:31:11.544Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ollevche.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-06T13:50:45.000Z","updated_at":"2020-11-06T18:44:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"33a12fe4-f56d-4205-bdf6-95d9acd03bc7","html_url":"https://github.com/ollevche/goshlib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollevche%2Fgoshlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollevche%2Fgoshlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollevche%2Fgoshlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollevche%2Fgoshlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ollevche","download_url":"https://codeload.github.com/ollevche/goshlib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246961955,"owners_count":20861182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-28T20:11:58.671Z","updated_at":"2026-01-16T00:46:18.382Z","avatar_url":"https://github.com/ollevche.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"## goshlib - Go Shared Library Example\n\nThis is an example of how to build shared libraries (**.dll**, **.so**) in **Go** and **C** using **Linux**.\n\nYou have to install `x86_64-w64-mingw32-gcc` compiler to build a shared library for **Windows** (**.dll**).\n\n**Makefile** has had targets for building **libraries** (**Go**, **C**) and a **client app** as an example. Here is how you can try it:\n\nTarget                      | Action\n-------                     |--------\n`make (all)`                | builds **Go** and **C** **.so** libraries, the **client app**, then **runs** the app\n`make run`                  | **runs** the app\n`make usego` / `make usec`  | swaps the shared library for **Go** / **C**\n`make win`                  | builds **Go** and **C** **.dll** libraries for **Windows**\n`make clean`                | deletes object files\n`make fclean`               | deletes object files, binaries and libraries\n`make re`                   | `make fclean` + `make (all)`\n\n### Useful resources\n\n* [How to - C libraries](https://www.cs.swarthmore.edu/~newhall/unixhelp/howto_C_libraries.html)\n\n* [Fun building shared libraries in Go](https://medium.com/@walkert/fun-building-shared-libraries-in-go-639500a6a669)\n\n* [Cross-Compiling Golang (CGO) Projects](https://dh1tw.de/2019/12/cross-compiling-golang-cgo-projects)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Follevche%2Fgoshlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Follevche%2Fgoshlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Follevche%2Fgoshlib/lists"}