February 16, 2008 linker query | ||||
---|---|---|---|---|
| ||||
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" ? |
February 17, 2008 Re: linker query | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ty Tower | "Ty Tower" <tytower@hotmail.com.au> wrote in message news:fp7l1j$1j19$1@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. |
Copyright © 1999-2021 by the D Language Foundation