Problem : building a module ...

Chris Gonnerman chris.gonnerman at newcenturycomputers.net
Fri Oct 12 03:55:59 CEST 2001


On Thu, 11 Oct 2001, dag4004 wrote:

> I want to creat a new module. It is a module wich use the Nano-X GUI
Client
> functions. To do so i creat a nanoxmodule.c with the Makefile.pre.in ....
> and i can creat a nanoxmodule.so
> BUT in python when i enter : import nanox
> my lovely interrpreter say me that the Nano-X function are unknown.
> It is right because the function are not linked in nanoxmodule.so but how
> could i force the linking of this functions in my nanoxmodule.so, i have
the
> library libnano-x.a but how could i "put" it in nanoxmodule.so

The build command for nanoxmodule.so should automatically contain -lnano-x
to include the libnano-x.a file (assuming it's in a standard location).
The Setup.in file should look something like:

    *shared*
    nanox nanoxmodule.c -lnano-x

Then the command:

    make -f Makefile.pre.in boot

should do the build correctly.

I assume you are on Solaris or Linux (based on the .so extension); correct
me if I am wrong.  On Linux the object files within the libnano-x.a file
would need to be compiled in shared mode (-fPIC on the gcc or libtool
command line) or the resulting nanoxmodule.so file would not work; you would
get linkage errors...






More information about the Python-list mailing list