Hi folks
Many thanks to Alexander and Martin for shedding some light on this. I
did have to make a patch to libtool to get shared libraries to build on
BeOS, and had to make a similar patch to the building rules for X.
Generally a BeOS config is pretty much the same as linux-elf, but
shared libraries are very different - they need all their symbols
resolved at link-time (which is why the problem occurs).
>The linking order problems are caused by these two symbols:
>vendorShellClassRec
>vendorShellWidgetClass
>which are defined *AND* referenced in both -lXm and -lXt. Somehow you
have to
>convince the linker to use the -lXm definitions to satisfy the
references in
>both -lXm and -lXt. The -lXt definitions should not be used.
This was exactly the clue I needed, thank you! I managed to get things
to work if I made static versions of both Xt and Xm. Alexander Mai
pointed me to the patch code that OS/2 does. From there I added an
empty C++ class to the project that does the same fixup as the OS/2 DLL
entry in its constructor, and added a static instance of that class.
The dynamic library init code runs that constructor, and now my shared
libraries work great. (This trick might work for other platforms that
need a fixup patch like the OS/2 one).
Once again, many thanks for the clues - it took a little work but it
was worth the effort :)
Chris