Re: Linking multiple libraries

2018-02-11 Thread Basile B. via Digitalmars-d-learn
On Sunday, 11 February 2018 at 01:38:41 UTC, b2.temp wrote: On Sunday, 26 November 2017 at 11:15:58 UTC, Jacob Carlborg wrote: On 2017-11-25 23:31, Mike Parker wrote: For "ld" on macOS the order does not matter. For "ld" on Linux the order does matter, but, if necessary, the following flags c

Re: Linking multiple libraries

2018-02-10 Thread b2.temp--- via Digitalmars-d-learn
On Sunday, 26 November 2017 at 11:15:58 UTC, Jacob Carlborg wrote: On 2017-11-25 23:31, Mike Parker wrote: For "ld" on macOS the order does not matter. For "ld" on Linux the order does matter, but, if necessary, the following flags can be used to link libraries in any order: "--start-group" an

Re: Linking multiple libraries

2017-11-26 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-11-25 23:31, Mike Parker wrote: You don't link static libraries with each other. They're just collections of object files intended to be linked with an executable or a DLL. Order doesn't matter for optlink or the MS linker, but other linkers, such as ld (which is commonly used with GCC

Re: Linking multiple libraries

2017-11-25 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 25 November 2017 at 22:43:30 UTC, A Guy With a Question wrote: Actually ignore that last comment, they are producing libs not dlls. Funny how all three ways of linking work... On Windows, when building a DLL, compilers typically produce an "import library" alongside it, which ha

Re: Linking multiple libraries

2017-11-25 Thread A Guy With a Question via Digitalmars-d-learn
On Saturday, 25 November 2017 at 22:40:49 UTC, A Guy With a Question wrote: On Saturday, 25 November 2017 at 22:36:32 UTC, A Guy With a Question wrote: On Saturday, 25 November 2017 at 22:31:10 UTC, Mike Parker wrote: On Saturday, 25 November 2017 at 22:18:52 UTC, A Guy With a Question wrote:

Re: Linking multiple libraries

2017-11-25 Thread A Guy With a Question via Digitalmars-d-learn
On Saturday, 25 November 2017 at 22:36:32 UTC, A Guy With a Question wrote: On Saturday, 25 November 2017 at 22:31:10 UTC, Mike Parker wrote: On Saturday, 25 November 2017 at 22:18:52 UTC, A Guy With a Question wrote: That's how I set up the linking in Visual D. Everything builds. But shoul

Re: Linking multiple libraries

2017-11-25 Thread A Guy With a Question via Digitalmars-d-learn
On Saturday, 25 November 2017 at 22:31:10 UTC, Mike Parker wrote: On Saturday, 25 November 2017 at 22:18:52 UTC, A Guy With a Question wrote: That's how I set up the linking in Visual D. Everything builds. But should the final exe try to link against all 3 libraries, library 3 link to libra

Re: Linking multiple libraries

2017-11-25 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 25 November 2017 at 22:18:52 UTC, A Guy With a Question wrote: That's how I set up the linking in Visual D. Everything builds. But should the final exe try to link against all 3 libraries, library 3 link to library 1 & 2 and library 2 link to library 1 (also builds)? Or is the

Linking multiple libraries

2017-11-25 Thread A Guy With a Question via Digitalmars-d-learn
Hi, So I got this working, I would just like to see if I have done this correctly or if it's just working out of a fluke. I am using Visual D. Lets say I have four projects: Library 1: Common Library Library 2: Base Service Library - Dependent on the Common Library. Library 3: More Specified