Here are the steps I am doing that cause me to get the error ImportError: No module named _hi. I'm running OS X 10.6.1 What am I doing wrong?
mkdir -p /tmp/my_swig_test cd /tmp/my_swig_test cat >hi.c<<. #include <stdio.h> void hello(void) {printf("Hello World\n");} . gcc -shared -o libhi.dylib hi.c cat >hi.i<<. %module hi %include "hi.c" . swig -python hi.i gcc -shared -I/System/Library/Frameworks/Python.framework/Headers - framework Python -L. -lhi -o _hi.dylib hi_wrap.c DYLD_LIBRARY_PATH=. python -c 'import hi; hi.hello()' -- http://mail.python.org/mailman/listinfo/python-list