ubuntu
cython安装ubuntu-凯发ag旗舰厅登录网址下载
i want my cython program to be standalone executable on linux, not to be imported. after
cython --embed
i got a c file,now how can i make it executable?
凯发ag旗舰厅登录网址下载的解决方案
i guess you have to compile the .c file you have obtained.
assuming you are using python 3.5 and don't have to link to other libraries than python you can do this with a simple gcc command like :
gcc -i /usr/include/python3.5m -o your_program your_file.c -lpython3.5m
(you might need to remove the m following the version number)
as you expect it will use the if __name__ == "__main__": statement as entry-point of the program.
总结
以上是凯发ag旗舰厅登录网址下载为你收集整理的cython安装ubuntu_ubuntu上的cython独立可执行文件的全部内容,希望文章能够帮你解决所遇到的问题。
如果觉得凯发ag旗舰厅登录网址下载网站内容还不错,欢迎将凯发ag旗舰厅登录网址下载推荐给好友。
- 上一篇:
- 下一篇: