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

About Chapter1 #2

Open
nooperpudd opened this issue Jul 20, 2014 · 1 comment
Open

About Chapter1 #2

nooperpudd opened this issue Jul 20, 2014 · 1 comment

Comments

@nooperpudd
Copy link

how could I if I first compile c and generate .so and with .h files
for example for the chapter 1:
gcc -g -O2 -fpic -c mycode.c -o mycode.o
gcc -g -O2 -shared -o mycode.so mycode.o

if I don't have any mycode.c and mycode.o files.
how could I use Cython to compile the .pyx.
Thanks.

@philberty
Copy link
Owner

to compile *.pyx files you need to run:

$ cython cythoncode.pyx

This creates cythoncode.c and cythoncode.h for anything that is public and it creates code targeting python2.x

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