Hello World Program In Cython Fails With Gcc After Installation Of Python-dev And Linking Libraries
I created a simple hello world program and tried to execute the generated C program using gcc but no matter what I do I get a massive list of undefined references. There are many
Solution 1:
It's better to use python2-config
to get the appropriate flags to pass to your compiler:
gcc `python2-config --cflags--ldflags` hello.c -o hello
Because you're compiling and linking in a single invocation, you'll need to pass both --cflags
and --ldflags
to python2-config
.
Post a Comment for "Hello World Program In Cython Fails With Gcc After Installation Of Python-dev And Linking Libraries"