Dynamic linking.. or??

Andrew Markebo flognat@flognat.myip.org
Wed May 23 04:54:00 GMT 2001


/ Suhaib Siddiqi <ssiddiqi@inspirepharm.com> wrote:
| > Yep it is in cygwin.rules.. Hmm ahh there we have a dll.. Hmm 
| > how does everything work?? 
| > 
| > Consider me doing 
| >  gcc -o myapp myapp.o -lX11 -lXaw
| > 
| > On solaris it links with libXaw.so, which probably 
| > automatically loads libXpm.so during runtime.
| > 
| > Checking an strace of the above on cygwin shows that it looks 
| > for libXaw.dll.a, fails and then loads libXaw.a, thats why it 
| ^^^^^ huh? Who looks for libXaw.dll.a?  We have no such thing.  
| Compiling libXaw.dll is not a good idea due to design of
| DLLs which M$ opted.

Yes the _linker_, when you tell it to link, when you do -lXaw it looks
for libXaw.dll.a, Xaw.dll.a, libXaw.a, Xaw.a in the path it has to
search.. It uses the first match it can find, the first match is
libXaw.a so it links with thatone.

| > wants us to include -lXpm, it _doesn't_ link dynamically!!
| 
| You can send a patch if you have an idea how to do it. :-)  For now you must
| add
| -lXpm -lXaw -lX11 to llinker

A simple patch, try to change in cygwin.rules.. 
  cygwin.rules:#define SharedLibXpm YES

Hopefully that is enough, making X11.tmpl grap static lib instead. On
Os2 libxpm is included in some kind of list of required stuff for
libXaw.. 

        /Andy

(followup on earlier email) 

| On Solaris x86 are you using XFree86 4.x or Xsun which ships with
| Solaris x86?
| If it is Xsun then it does not use liXpm.  LibXpm was introduced in
| XFre86 from Version 4.0.  I have run into this issue sometimes on Linux too.

It is Solaris on Sun hardware.. But with X11R6..



More information about the Cygwin-xfree mailing list