https://github.com/bunji2/cgo
Minimal samples of cgo
https://github.com/bunji2/cgo
c cgo go golang mingw python2 windows
Last synced: about 2 months ago
JSON representation
Minimal samples of cgo
- Host: GitHub
- URL: https://github.com/bunji2/cgo
- Owner: bunji2
- License: mit
- Created: 2018-02-05T14:07:09.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-21T08:18:10.000Z (about 7 years ago)
- Last Synced: 2025-03-27T14:55:25.962Z (2 months ago)
- Topics: c, cgo, go, golang, mingw, python2, windows
- Language: C
- Homepage:
- Size: 1.77 MB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Minimal samples of CGO
* [GoC] Calling C functions from Go program
* [CGo] Calling Go functions from C program
* [GoPy] Calling Python functions from Go program via C
* [PyGo] Calling Go Functions from Python program via C## Environment
* Windows 7 Professional SP1 64bit / Windows 10 Pro 64bit
* Go 1.9.3 windows/amd64
* MSYS64
* gcc (Rev2, Built by MSYS2 project) 7.3.0
* gnu make 4.2.1
* Python 2.7.14## Instaling MSYS64 / MINGW64
Download x86_64 installer from http://www.msys2.org/ and install.
Enter following commands at your msys console.
```
$ pacman -Sy
$ pacman -Su(you will restart msys console.)
$ pacman -S base-devel
$ pacman -S mingw-w64-x86_64-toolchain
$ pacman -S mingw-w64-x86_64-python2
```## Installing GoLang
Download x86_64 installer from https://golang.org/ and install.
## Environment Variables
```
rem GoLang
PATH C:\Go\bin;%PATH%rem MSYS64 / MINGW64
PATH C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%
```