https://github.com/s4kibs4mi/go-native
An example project explaining how to use c/c++ shared library in Golang.
https://github.com/s4kibs4mi/go-native
Last synced: about 2 months ago
JSON representation
An example project explaining how to use c/c++ shared library in Golang.
- Host: GitHub
- URL: https://github.com/s4kibs4mi/go-native
- Owner: s4kibs4mi
- Created: 2019-10-17T13:19:02.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-17T13:19:48.000Z (almost 6 years ago)
- Last Synced: 2023-08-04T16:38:44.525Z (about 2 years ago)
- Language: Go
- Size: 0 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go Native
An example project explaining how to use c/c++ shared library in Golang.1. Generate C object,
```bash
gcc -c -Wall -Werror -fpic hello.c
```2. Generate shared library,
```bash
gcc -shared -o libhello.so hello.o
```3. Build go,
```bash
go build -v -o main
```4. Run
```bash
./main
```