Re: Problem when import C model

2006-07-03 Thread Nick Craig-Wood
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > What you describe makes perfect sense to me. If python is a 64 bit > program, it can only link to 64 bit libraries. If you compiled your > library in 32-bit mode, then the library headers will indicate this, > and linux's library loading code wil

Re: Problem when import C model

2006-07-03 Thread [EMAIL PROTECTED]
this is more of a linux question than a python question, so you may get better luck with asking there. What you describe makes perfect sense to me. If python is a 64 bit program, it can only link to 64 bit libraries. If you compiled your library in 32-bit mode, then the library headers will indi

Problem when import C model

2006-07-03 Thread [EMAIL PROTECTED]
Hi, all I am learning how to import c code in python. Here is my simple code foo.c: = #include void bar() { printf("Hello! C wrap!"); } static PyObject *foo_bar(PyObject *self, PyObject *args) { /* Do something interesting here. */ bar(); Py_RETURN_NONE; } static PyMethod