info-inventor-dev
[Top] [All Lists]

Re: Building custom nodes with gcc

To: Rasmus Tamstorf <tamstorf@xxxxxxxxxxxxx>
Subject: Re: Building custom nodes with gcc
From: Nico Schmidt <Nico.Schmidt@xxxxxxxxxx>
Date: Tue, 26 Sep 2000 18:12:46 +0200
Cc: info-inventor-dev@xxxxxxxxxxx
In-reply-to: <Pine.SGI.4.10.10009260838300.30471-100000@xxxxxxxxxxxxxxxxxxxxxxx>; from tamstorf@xxxxxxxxxxxxx on Tue, Sep 26, 2000 at 08:56:11AM -0700
References: <Pine.SGI.4.10.10009260838300.30471-100000@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-info-inventor-dev@xxxxxxxxxxx
There's no problem having a file been known by two names.
Just ln -s myNode.so libmyNode.so

Regards,
  Nico

On Tue, Sep 26, 2000 at 08:56:11AM -0700, Rasmus Tamstorf wrote:
> I've been trying to build some of my custom inventor nodes on linux, but
> I'm running into problems with the linker (ld), so I'm wondering if anyone
> has solved this problem. 
> 
> Generally, when loading an ivfile (say with ivview) which has a node of
> type 'myNode', inventor will try to load a DSO called 'myNode.so'. I can
> create this DSO just fine, but when I come around to building my
> application 'myApp' which deals with 'myNode' I get into trouble because I
> have to link with 'myNode.so'. 
> 
> The link line for 'myApp' is something like : 
> 
>   ld -o myApp myApp.o -lmyNode -lInventor
> 
> but the gnu linker insists on translating '-lmyNode' into 'libmyNode.so'
> and since the real name is 'myNode.so' it fails :-( The SGI linker
> actually looks for both 'libmyNode.so' and 'myNode.so' so here it works
> fine. 
> 
> The obvious workaround is to rename my new node to 'libmyNode', but I
> already have a *LOT* of iv files using the 'myNode' naming convention, so
> I'd rather not do that.
> 
> The other workaround is to change inventor to look for 'myNode.so' and if
> that fails then look for 'libmyNode.so'. This seems doable. 
> 
> However, it seems to me that the "right" solution is to fix 'ld' so
> libraries don't *have* to start their name with lib, but I don't know
> enough about linking to tell whether that'll break other things.
> 
> Has anyone else run into this problem ? Am I overlooking something
> obvious ? 
> 
> Thanks for your help,
> Rasmus
> 
> -----------------------------------------------------------------------------
> Rasmus.Tamstorf@xxxxxxxxxx         "A problem worthy of attack, 
> Walt Disney Feature Animation       proves its worth by hitting back" Kumbel
> -----------------------------------------------------------------------------

-- 
Nico Schmidt IPK/IWF              eMail : nico.schmidt@xxxxxxxxxx
Sekr. PTZ 4, Pascalstr. 8-9       Phone : +49-30-39006342
D-10587 Berlin

<Prev in Thread] Current Thread [Next in Thread>