Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > What am I doing wrong with SWIG in OS X Snow Leopard?

Reply
Thread Tools

What am I doing wrong with SWIG in OS X Snow Leopard?

 
 
Zectbumo
Guest
Posts: n/a
 
      10-20-2009
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()'
 
Reply With Quote
 
 
 
 
Aahz
Guest
Posts: n/a
 
      10-23-2009
In article <(E-Mail Removed)>,
Zectbumo <(E-Mail Removed)> wrote:
>
>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?


You probably want to ask on pythonmac-sig
--
Aahz ((E-Mail Removed)) <*> http://www.pythoncraft.com/

Member of the Groucho Marx Fan Club
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Snow, glorious snow.....brings down the global warming fanatics richard Computer Support 10 02-07-2010 01:02 AM
Still wrong architecture on Snow Leopard Xiao Yu Python 0 10-13-2009 07:19 AM
my swig stuff is wrong, but I can't figure out another way... Sam Roberts Ruby 2 04-14-2004 12:06 AM
VB6/VB.Net Programming Question - what am i doing wrong? Salisha Khan ASP .Net 1 08-01-2003 01:55 PM
What am I doing wrong? Keith R. Williams VHDL 4 07-15-2003 03:08 AM



Advertisments