Replies: 5 comments 21 replies
-
@chmike, I'm not exactly sure why it's trying to link against
|
Beta Was this translation helpful? Give feedback.
-
Thank you very much for responding. I'm not sure I understood your question and comment. This is just a hello world c library that is called by a python wrapper using ctypes. When compiled locally it works and I successfully ran the test using pytest. I used I need the wheels for easy install on windows. cibuildwheel looked like the perfect tool to do that. |
Beta Was this translation helpful? Give feedback.
-
I do know Windows links extensions against python39.lib, while Linux / macOS do not. I think you need to set this up without making it an Extension. |
Beta Was this translation helpful? Give feedback.
-
After desperately trying to make my small example using The conclusion is that to get a portable precompiled module, I do need to create a real python extension that wraps my python C agnostic library. I wish I had this information when I started. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestion. Why would using `ctypes` be a preferred path compared to writing a real python extension ? Is it because it avoids dependencies to python versions ?
Bien cordialement,
Ch.Meessen
Le 20 févr. 2021 à 12:24 +0100, Grzegorz Bokota <[email protected]>, a écrit :
… So create own_free function in your library.
Your code will also fail in some of unx like system (for example alpine linux has musl instead of glibc)
Allow compiler do its job.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
Disclaimer: I’m a unix programmer with not much experience in windows programming
I have a very simple hello world program and I’m trying to build wheels using github actions.
The source code I’m compiling is as follow:
The compilation output is the following:
I don’t know what this PyInit_ext is. I didn’t expect I would have to do anything special about my c code. When I compile my code manually into a shared library on linux I have no problems.
Beta Was this translation helpful? Give feedback.
All reactions