linker query

Neil Vice psgdg at swiftdsl.com.au
Sat Feb 16 18:12:44 PST 2008


"Ty Tower" <tytower at hotmail.com.au> wrote in message 
news:fp7l1j$1j19$1 at digitalmars.com...
>I notice my libraries are called
> libphobos.a
> libtango-base-dmd.a
> libtangobos.a
> etc
>
> So when I compile a program with dmd the command put out is so
> dmd MyStuff/main.d
> gcc main.o -o 
> main -m32 -Xlinker -L/usr/bin/../lib -ltango-user-dmd -ltango-base-dmd -lpthread 
>  -lm
>
>
> so with the "-l" switch above  , does that get converted internally  to 
> the prefix "lib"  ?

Yes this is exactly what happens.

Under linux (and possibly others) libxxx.a is the standard naming convention 
for the file containing a static library named xxx. As such, only the 'name' 
of the library is required by GCC and it is expanded to the filename 
internally as you say.





More information about the Digitalmars-d-learn mailing list