in reply to Re^2: shared-obj linking in xs-module
in thread shared-obj linking in xs-module
You're trying to link an object (.o) file against a library. You should do that with the shared-object file (.so).
For example I use this commandline to link some of my XS code against a shared library.
cc -shared -L/usr/local/lib xs/Connection.o xs/Loudmouth.o xs/Message +.o \ xs/MessageHandler.o xs/MessageNode.o xs/Proxy.o xs/SSL.o perlmouth.o \ build/perlmouth-gtypes.o -o blib/arch/auto/Net/Jabber/Loudmouth/Loudm +outh.so \ -lloudmouth-1 -lglib-2.0 -lgobject-2.0 -lgthread-2.0
This works pretty well.
Another possibility would be to link the libmyprint object file (.o) together with helloworld.o into helloworld.so.
Cheers, Flo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: shared-obj linking in xs-module
by warlock (Initiate) on Mar 16, 2006 at 14:19 UTC | |
by rafl (Friar) on Mar 16, 2006 at 14:32 UTC | |
by warlock (Initiate) on Mar 16, 2006 at 14:52 UTC | |
by rafl (Friar) on Mar 16, 2006 at 15:00 UTC | |
by warlock (Initiate) on Mar 16, 2006 at 15:03 UTC | |
|