digitalmars.D.learn - Linker -how it works
- Ty Tower (5/5) Feb 17 2008 Ok -previous post established "-l" switch is replaced with"lib"
- Mike Parker (7/12) Feb 17 2008 yes, it's a Linux convention. Static libraries (.a) and shared libraries...
- Ty Tower (4/12) Feb 17 2008 the "-lm" in the first post ,if this is turned into "libm" them I have n...
- Ty Tower (4/12) Feb 17 2008 the "-lm" in the first post ,if this is turned into "libm" them I have n...
- Ty Tower (1/1) Feb 17 2008 Disregard previous post -found "libm.so" which answers my question
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
Feb 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 instanceThis 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.
Feb 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 -thanksLook 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.
Feb 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 -thanksLook 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.
Feb 17 2008
Disregard previous post -found "libm.so" which answers my question
Feb 17 2008