https://github.com/fooock/golang-c-shared-lib
Sample go project to generate a C shared library
https://github.com/fooock/golang-c-shared-lib
Last synced: 9 months ago
JSON representation
Sample go project to generate a C shared library
- Host: GitHub
- URL: https://github.com/fooock/golang-c-shared-lib
- Owner: fooock
- Created: 2018-06-03T15:00:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-03T15:00:47.000Z (over 7 years ago)
- Last Synced: 2025-02-12T05:56:57.444Z (11 months ago)
- Language: Makefile
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# C shared libray with Golang
[](https://opensource.org/licenses/Apache-2.0)
Sample project to generate a C sharid library from a go project. To generate the `header` file and the `.so` just
execute the task
```sh
$ make build
````
This will generate a folder called `bin` with two files:
```sh
$ ls -la bin/
-rw-r--r-- 1 javi staff 1520 3 jun 16:28 library.h
-rw-r--r-- 1 javi staff 1461064 3 jun 16:28 library.so
```
> These files for default are called `library`
You can change the `.h` and `.so` names using the `NAME` variable. Imagine that you want to name the files `customname`. Then you execute:
```sh
$ make build NAME=customname
````