Re: dub: how to reference a compiled package

2016-02-26 Thread Chris Wright via Digitalmars-d-learn
On Fri, 26 Feb 2016 03:19:26 +, mahdi wrote: > Great! Thanks. > > I was looking for a feature like `jar` files in Java or `assemblies` in > C# where all compiled code and metadata/symbols are stored together > inside a single binary file. C# and Java provide their own linkers and specify the

Re: dub: how to reference a compiled package

2016-02-25 Thread asdf via Digitalmars-d-learn
On Friday, 26 February 2016 at 04:03:15 UTC, BBasile wrote: e.g the DMD equivalent for the two previous example is DMD "sourceThis.d" "folder/interface.di" "folder/binary.a" -ofbin/thesoft You can mix unlinked binaries and text-editor source files on commandline? Didn't know that when I trie

Re: dub: how to reference a compiled package

2016-02-25 Thread Mike Parker via Digitalmars-d-learn
On Friday, 26 February 2016 at 04:03:15 UTC, BBasile wrote: The D interface file must be specified to DUB using "sourceFiles" : ["folder/interface.di"], either in a config or in the globals. The binary, so either a .lib | .a or .obj | .o must be specified to DUB using "DFlags" : ["folder/

Re: dub: how to reference a compiled package

2016-02-25 Thread Mike Parker via Digitalmars-d-learn
On Friday, 26 February 2016 at 03:19:26 UTC, mahdi wrote: Great! Thanks. I was looking for a feature like `jar` files in Java or `assemblies` in C# where all compiled code and metadata/symbols are stored together inside a single binary file. I think same can be implemented for D language an

Re: dub: how to reference a compiled package

2016-02-25 Thread BBasile via Digitalmars-d-learn
On Thursday, 25 February 2016 at 12:15:42 UTC, mahdi wrote: Hi, Suppose I have a package `mypack` in `~/mypack`. I run `dub` command on this package and have the compiled `mypack` file (OS is Linux). Now I am working on my project. I know how to use the source-code of `mypack` package in th

Re: dub: how to reference a compiled package

2016-02-25 Thread mahdi via Digitalmars-d-learn
On Friday, 26 February 2016 at 02:49:20 UTC, Mike Parker wrote: On Thursday, 25 February 2016 at 21:06:59 UTC, mahdi wrote: On Thursday, 25 February 2016 at 16:45:46 UTC, Chris Wright Thanks. Is there a way to use a D library without having access to it's source code? I tried `dmd -lib abcd.d

Re: dub: how to reference a compiled package

2016-02-25 Thread Mike Parker via Digitalmars-d-learn
On Friday, 26 February 2016 at 02:49:20 UTC, Mike Parker wrote: The compiler needs to know about S and its types, and it needs S and its *members*

Re: dub: how to reference a compiled package

2016-02-25 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 25 February 2016 at 21:06:59 UTC, mahdi wrote: On Thursday, 25 February 2016 at 16:45:46 UTC, Chris Wright Thanks. Is there a way to use a D library without having access to it's source code? I tried `dmd -lib abcd.d` which creates a static library. But still I need to specify pa

Re: dub: how to reference a compiled package

2016-02-25 Thread mahdi via Digitalmars-d-learn
On Thursday, 25 February 2016 at 16:45:46 UTC, Chris Wright wrote: On Thu, 25 Feb 2016 12:15:42 +, mahdi wrote: Hi, Suppose I have a package `mypack` in `~/mypack`. I run `dub` command on this package and have the compiled `mypack` file (OS is Linux). Now I am working on my project. I

Re: dub: how to reference a compiled package

2016-02-25 Thread Chris Wright via Digitalmars-d-learn
On Thu, 25 Feb 2016 12:15:42 +, mahdi wrote: > Hi, > > Suppose I have a package `mypack` in `~/mypack`. I run `dub` command on > this package and have the compiled `mypack` file (OS is Linux). > > Now I am working on my project. I know how to use the source-code of > `mypack` package in the

dub: how to reference a compiled package

2016-02-25 Thread mahdi via Digitalmars-d-learn
Hi, Suppose I have a package `mypack` in `~/mypack`. I run `dub` command on this package and have the compiled `mypack` file (OS is Linux). Now I am working on my project. I know how to use the source-code of `mypack` package in the project but what if I only have the compiled binary? How c