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
-----------------------------------------------------------------------------
|