[Ficl-developers] Linking?
Brought to you by:
jsadler
From: Michel P. <mi...@zo...> - 2001-11-30 00:44:07
|
Ficl looks pretty cool. Gots a embedding ficl question. I'm embedding a ficl vm into Python extension module. The stub module currently works like this: $ python >>> import ficl >>> v = ficl.vm() >>> v <FiclVM object at 0x80cbcd8> >>> When the module ficl (which is written in C) is imported, a .so file is dynamicly loaded. The C function that gets called looks like this: DL_EXPORT(void) initficl(void) { PyObject *module, *module_dict; FICL_SYSTEM *fs; // do some Python initializations .... fs = ficlInitSystem(32000) } This code compiles into ficl.so ( the "extention module") fine, but when I want to import the 'ficl' module I get an error: >>> import ficl Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: libficl.so.3.0.0: cannot load shared object file: No shuch file or directory >>> Python can't find libficl.so.3.0.0, which is right there in the 'ficl' subdirectory, even when I put it right in the same directory as ficl.so. Here's the gcc compile command: gcc -Ificl -c ficlmodule.c -o ficlmodule.o gcc -shared ficlmodule.o -Lficl -lficl -o ficl.so Any tips? Thanks! Sorry I don't know much about building C. -Michel |