How to link libXm.a library into an application to allow debugging with gdb

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

Questions about motif? Contact us

2 posts / 0 new
Last post
How to link libXm.a library into an application to allow debugging with gdb

I have an application that is misbehaving. It goes into a hard loop when the user closes a page. The last application f() calls the Xtunmanage() and from there the backtrace is many layers deep. I would like to be able to step through these routines to see what is wrong with the data structures to cause this.
I have installed the source code and built it but when I try to link to the generated library libXm.a I get a huge number of undefined references to f()s which looks they are in libXm.a
My application is made up of many libraries of our generated source. We use -Wl, --start-group
our libraries
Motif libraries
-W1, --end-group -z muldefs
Probably something obvious I am missing.

 

 

note that the linker will prefer libXm.so over libXm.a

I am not sure what your problem is but missing symbols normaly mean that the libXm is not linked at all. Maybe you have to define a path like -L/for/my/lib.

While debugging LD_PRELOAD comes handy, see man ld.so for details.

hope that helps