Re: Need help with loading .SO file
- From: Michael Schlenker <schlenk@xxxxxxxxxxxxxxxx>
- Date: Wed, 30 Aug 2006 12:57:25 +0200
ShurikAg@xxxxxxxxx wrote:
ShurikAg@xxxxxxxxx wrote:No idea where this symbol comes from, sounds like gcc...
Shuri...@xxxxxxxxx wrote:
Michael Schlenker wrote:
ShurikAg@xxxxxxxxx schrieb:Is it durin the compiling or during linking?
Tobias Hippler wrote:Its the wrong lib. You initialize STUBS in your code, so link with the
ShurikAg@xxxxxxxxx wrote:How do I suppose to do it?
There is Proc.cpp:
I think it somthing like: gcc -fPIC -l libtk8.3.a -c Proc.cpp
But it doesn't work...
stubs lib and define -DUSE_TCL_STUBS during compile. libtclstub8.3.a is
the lib in your case.
this is what I'm doing:
ismc01 [164] gcc -fPIC -c Proc.cpp
ismc01 [165] gcc -shared -L
/nfs/iil/itools/sun4m_solaris_2.6/pkgs/tcl-tk/8.3.2/lib/ -ltclstub8.3
-o Proc.so Proc.o
every thing compiles without problems.
Then, in "wish8.3":
% load /nfs/iil/disks/home05/aagulya/TCL/Proc.so
couldn't load file "/nfs/iil/disks/home05/aagulya/TCL/Proc.so":
ld.so.1: wish8.3: fatal: relocation error: file
/nfs/iil/disks/home05/aagulya/TCL/Proc.so: symbol __gxx_personality_v0:
referenced symbol not found
Try:
gcc -fPIC -DUSE_TCL_STUBS=1 -c Proc.cpp
gcc -shared -L /nfs/iil/itools/sun4m_solaris_2.6/pkgs/tcl-tk/8.3.2/lib/
-ltclstub8.3 -o Proc.so Proc.o
another thing:There is no dynamic lib libtclstub8.3.so, only a static libtclstub8.3.a,
the command: gcc -shared -L
/nfs/iil/itools/sun4m_solaris_2.6/pkgs/tcl-tk/8.3.2/lib/ -ltclstub8.3
-o Proc.so Proc.o
taking into acount only the dynamic library (libtclstub8.3.so), isn't
it?
STUBS allows you to load your extension into Tcl 8.5/Tcl 8.4 without a
recompile, which would otherwise be needed. Additionally it allows you
to use your extension in wrapped form (for example in starkits).
what I need is static...What do you need static (and why?) If you need a fully static tclsh with
some extra functionalities you are on the wrong track. Static packages
work differently, see the tclkit or dqkit builds for some nice single
file shells with extra static packages included.
And to repeat myself: Tcl 8.3.2 is ancient, get something more recent.
Michael
.
- Follow-Ups:
- Re: Need help with loading .SO file
- From: ShurikAg
- Re: Need help with loading .SO file
- References:
- Need help with loading .SO file
- From: ShurikAg
- Re: Need help with loading .SO file
- From: Tobias Hippler
- Re: Need help with loading .SO file
- From: ShurikAg
- Re: Need help with loading .SO file
- From: Michael Schlenker
- Re: Need help with loading .SO file
- From: ShurikAg
- Re: Need help with loading .SO file
- From: ShurikAg
- Re: Need help with loading .SO file
- From: ShurikAg
- Need help with loading .SO file
- Prev by Date: Re: SMTP returns sockXXX error when sending large emails
- Next by Date: tcom: selecting instance to connect to...
- Previous by thread: Re: Need help with loading .SO file
- Next by thread: Re: Need help with loading .SO file
- Index(es):
Relevant Pages
|