Thread overview
Linker -how it works
Feb 17, 2008
Ty Tower
Feb 17, 2008
Mike Parker
Feb 17, 2008
Ty Tower
Feb 17, 2008
Ty Tower
Feb 17, 2008
Ty Tower
February 17, 2008
Ok -previous post established  "-l" switch is replaced with"lib"

I had a look at my libraries and most end with ".a" , however the linker outpu I am trying to analyse says in part this:-   "-lpthread -lm"

now I have no library called " libm" whatever and "libpthread" does not end with ".a" ,rather it ends with "so.0"  . Its full title is libpthread.so.0.

Will the linker still find and use it with that name?

Is there somewhere on digitalMars site which explains this linking process - not that gives me a load of B/S of how good it is ?, but which explains how these switches work like "dmd man" for instance
February 17, 2008
Ty Tower wrote:

> now I have no library called " libm" whatever and "libpthread" does not end with ".a" ,rather it ends with "so.0"  . Its full title is libpthread.so.0.  
> 
> Will the linker still find and use it with that name?

yes, it's a Linux convention. Static libraries (.a) and shared libraries (.so) are interchangeable.

> 
> Is there somewhere on digitalMars site which explains this linking process - not that gives me a load of B/S of how good it is ?, but which explains how these switches work like "dmd man" for instance

This is not a DMD issue. It's an aspect of the GCC backend that DMD uses on Linux. You can start here for some info: http://www.lurklurk.org/linkers/linkers.html#linker2.

Look up the GCC manual (http://gcc.gnu.org/onlinedocs/) for more details.
February 17, 2008
Mike Parker Wrote:

> 
> yes, it's a Linux convention. Static libraries (.a) and shared libraries (.so) are interchangeable.

> This is not a DMD issue. It's an aspect of the GCC backend that DMD uses on Linux. You can start here for some info: http://www.lurklurk.org/linkers/linkers.html#linker2.

Got to here so far Mike -thanks
> 
> Look up the GCC manual (http://gcc.gnu.org/onlinedocs/) for more details.


the "-lm" in the first post ,if this is turned into "libm" them I have no library of that name . Should I have or is this special ?
I found no reference to it on the linker2 page above.

February 17, 2008
Mike Parker Wrote:

> 
> yes, it's a Linux convention. Static libraries (.a) and shared libraries (.so) are interchangeable.

> This is not a DMD issue. It's an aspect of the GCC backend that DMD uses on Linux. You can start here for some info: http://www.lurklurk.org/linkers/linkers.html#linker2.

Got to here so far Mike -thanks
> 
> Look up the GCC manual (http://gcc.gnu.org/onlinedocs/) for more details.


the "-lm" in the first post ,if this is turned into "libm" them I have no library of that name . Should I have or is this special ?
I found no reference to it on the linker2 page above.

February 17, 2008
Disregard previous post -found "libm.so" which answers my question