2

I compiled a module.pyx file to module.so under Mac OS X, and now I can use it with:

from module import method1

However, the same .so file won't work on Linux, I have to compile a new module.so under Linux.

So the problem is, how can I write a cross platform(Mac and Linux) module with Cython?

1 Answer 1

5

You can't. You'll have to compile a different library for each platform you need to support.

Sign up to request clarification or add additional context in comments.

2 Comments

... that is, the module source can be cross platform, it just has to be compiled for each platform.
If so, how can I write a single export_module.py to expose a universal interface for both platform?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.