|
Struggling with "Hello World" Extension type: msg#00038python.pyrex
Hi All, I'm trying to learn how to use Pyrex by wrapping a few functions from the libpq library. I started with the following... cdef extern from "libpq-fe.h": ctypedef enum ConnStatusType: CONNECTION_OK CONNECTION_BAD ctypedef struct PGconn .... PGconn *PQconnectdb(char *conninfo) cdef class Connection: ... cdef PGconn *conn def __new__(self, conninfo): self.conn = <PGconn*>PQconnectdb(conninfo) This compiles fine but when you try to import the .so file, you get "Import Error: ./libpq.so: undefined symbol: PQconnectdb". I've googled for code that does similar things and I can't see what I'm doing differently. Can anyone point me in the right direction? Thanks, Andy ___________________________________________________________ Try the all-new Yahoo! Mail. "The New Version is radically easier to use" � The Wall Street Journal http://uk.docs.yahoo.com/nowyoucan.html _______________________________________________ Pyrex mailing list Pyrex@xxxxxxxxxxxxxxxxx http://lists.copyleft.no/mailman/listinfo/pyrex |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Callbacks from other threads (crash in PyGILState_Release): 00038, Stefan Behnel |
|---|---|
| Next by Date: | Re: Struggling with "Hello World" Extension type: 00038, Bryan O'Sullivan |
| Previous by Thread: | pix compilation dependencies with distutilsi: 00038, Fabien Cromières |
| Next by Thread: | Re: Struggling with "Hello World" Extension type: 00038, Bryan O'Sullivan |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |