dlopen & "add non-widget child dsm problem"

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

1 post / 0 new
dlopen & "add non-widget child dsm problem"

Submitted by guybarrand on Thu, 02/06/2003 - 17:03.

Hello

I have the error
Error attempt to add non-widget child dsm to parent...

This problem is well known and is in general related
to a bad link order of Motif and Xt (having for exa -lXt -lXm).

This time I encounter it in a more nasty context. It is related to dynamic loading. I have (in a big app) two DLLs
- one linked with OpenGL and X11 -lGLU -lGL -lX11
- one, handling the GUI, linked with -lXm -lXt -lX11 (in that order)
It appears that the app framework loads first the
first one and after loads the second. Then the error appears
when the GUI is started (at the XtAppInitialize).
I have few control on the loading ordering.

Is there a way to bypass the problem by doing something
before XtAppInitialize (resetting some global variable) in the
second DLL (where I am the master of the code) ?

Note that a link against X11 in the first DLL is in fact sufficient
to produce the problem. It is even not needed to execute some
OpenGL or X11 code here. The first DLL is open with
dlopen(RTLD_LAZY) and teh second with dlopen(LAZY and GLOBAL).

I am on a RedHat-7.2 with an OpenMotif-2.2

I am pretty sure that this is a known problem, but have not
yet found a report on the web....

Any bit of help would be appreciated.

Best regards