Tag: cython

在Mac上使用cython和emscripten编译平凡的python程序到javascript

我想从Python使用cython和emscripten生成JavaScript。 hello.py : print 'Hello world.' 然后我使用cython将其编译为c >>> cython –embed hello.py -v 这生成一个hello.c文件,我编译 >>> gcc hello.c -I/usr/include/python2.7/ -lpython2.7 这适用于gcc或clang。 当我执行./a.out我得到了预期的输出 >>> ./a.out >>> Hello world 接下来我想使用emscripten将hello.c编译成javascript >>> emcc hello.c -I/usr/include/python2.7/ -lpython2.7 我明白了 >>> WARNING emcc: -I or -L of an absolute path encountered. >>> If this is to a local system header/library, it may cause […]