Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LNK1181 error on W10 trying to use this module #262

Open
Mrodent opened this issue Jun 22, 2021 · 1 comment
Open

LNK1181 error on W10 trying to use this module #262

Mrodent opened this issue Jun 22, 2021 · 1 comment

Comments

@Mrodent
Copy link

Mrodent commented Jun 22, 2021

I am trying to write a Rust module which can be called from CPython.

Please see this SO question.

The build never works with --release switch and only intermittently without it.

I have no idea what the issue is here but it's presumably something to do with the toolchain(s) on W10.

@dgrunwald
Copy link
Owner

rust-cpython will (via this build script) ask your current Python interpreter for its sys.exec_prefix. It'll then look for python39.lib relative to that directory.
Which Python interpreter gets asked can be controlled with the PYTHON_SYS_EXECUTABLE envvar, if that isn't set, it'll use python or python3 in PATH.

Try running python -c "import sys; print(sys.exec_prefix)" and see if that directory contains libs/python39.lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants