Comments (2)
Installed different GCC compiler and I get a different error now:
gopy build -output=test -vm=python test
go build -v test
test
--- Processing package: test ---
no LibDir -- copy from IncDir: C:/Users/soma/AppData/Local/Programs/Python/Python311/Include
no LibPy -- set to: python311
no LibDir -- copy from IncDir: C:/Users/soma/AppData/Local/Programs/Python/Python311/Include
no LibPy -- set to: python311
--- building package ---
gopy.exe build -output=test -vm=python test
goimports -w test.go
no LibDir -- copy from IncDir: C:/Users/soma/AppData/Local/Programs/Python/Python311/Include
no LibPy -- set to: python311
go build -mod=mod -buildmode=c-shared -o test_go.pyd .
cmd had error: exit status 1 output:
# test/test
C:\Program Files\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1
C:/Program Files/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython311: No such file or directory
collect2.exe: error: ld returned 1 exit status
2023/07/02 22:26:33 error dispatching command: exit status 1
from gopy.
Okay, finally got it working. The solution was:
- Download MinGW https://github.com/niXman/mingw-builds-binaries/releases
- Set
LIBRARY_PATH
environment variable and add the python path to it
After this it properly builds
from gopy.
Related Issues (20)
- How hard would it be to generate C bindings instead of Python bindings? HOT 1
- Allow for fetching entire `[]byte` slice as `bytes` HOT 5
- Windows build broke without the sed hack
- Build constraints exclude all Go files in HOT 1
- "go": cannot run executable found relative to current directory HOT 3
- Best way to pass data chunks (bytes, bytearray)? HOT 1
- Panic when function returns a map of non-pointer structs HOT 2
- gopy: only one function signature arg allowed HOT 1
- cross-platform generation of Python bindings HOT 1
- Enhancement request: enable manylinux builds
- fmt.Stringer on the Go side didn't get called properly from __str__ on the Python side. HOT 1
- Add hacktoberfest topic
- No consts documentation is generated
- gopy doesn't ignore internal package HOT 2
- []byte Parameter Results in Unexpected Integer Type HOT 1
- Methods with two outputs are expected to return an error, methods aren't visible from python
- Can't return a slice of slices ([][]bool) HOT 3
- Type aliases points to the underlying type not the root one, this cause issues where the autogenerated go package does not build if it links to internal packages. HOT 4
- Invalid #cgo CFLAGS / Invalid #cgo LDFLAGS on Windows for path with space HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gopy.