Re: Including a file

2021-07-18 Thread Mathias LANG via Digitalmars-d-learn
On Sunday, 18 July 2021 at 17:48:53 UTC, Vindex wrote: On Sunday, 18 July 2021 at 17:31:24 UTC, Adam D Ruppe wrote: On Sunday, 18 July 2021 at 17:28:07 UTC, Vindex wrote: Error: file "thing.json" cannot be found or not in a path specified with -J You need to specify the path where it is found

Re: Including a file

2021-07-18 Thread Ali Çehreli via Digitalmars-d-learn
On 7/18/21 10:28 AM, Vindex wrote: > ``` > ldc2 source/main.d -ofmyprogram -L-l:libmylib.so.0 > Error: file "thing.json" cannot be found or not in a path specified with -J > ``` > > Is the actual inclusion of the file on import deferred until the link step? I wonder whether it's an ldc thing

Re: Including a file

2021-07-18 Thread Vindex via Digitalmars-d-learn
On Sunday, 18 July 2021 at 17:31:24 UTC, Adam D Ruppe wrote: On Sunday, 18 July 2021 at 17:28:07 UTC, Vindex wrote: Error: file "thing.json" cannot be found or not in a path specified with -J You need to specify the path where it is found with the -J switch to the compiler. Like `ldc2 -J. you

Re: Including a file

2021-07-18 Thread Vindex via Digitalmars-d-learn
On Sunday, 18 July 2021 at 17:31:24 UTC, Adam D Ruppe wrote: On Sunday, 18 July 2021 at 17:28:07 UTC, Vindex wrote: Error: file "thing.json" cannot be found or not in a path specified with -J You need to specify the path where it is found with the -J switch to the compiler. Like `ldc2 -J. you

Re: Including a file

2021-07-18 Thread Adam D Ruppe via Digitalmars-d-learn
On Sunday, 18 July 2021 at 17:28:07 UTC, Vindex wrote: Error: file "thing.json" cannot be found or not in a path specified with -J You need to specify the path where it is found with the -J switch to the compiler. Like `ldc2 -J. yourfile.d

Including a file

2021-07-18 Thread Vindex via Digitalmars-d-learn
One of my library modules (for example, libmylib) has the line `immutable string jsonText = import("thing.json")` When I try to build a program with this (already installed) library I see error ``` ldc2 source/main.d -ofmyprogram -L-l:libmylib.so.0 Error: file "thing.json" cannot be found or

Re: including a file

2008-11-10 Thread Frits van Bommel
Christopher Wright wrote: Jarrett Billingsley wrote: On Sun, Nov 9, 2008 at 10:18 PM, James <[EMAIL PROTECTED]> wrote: i created to include file, 1 with 'module xxx' declaration and the other without it. but i still can import both files. what is the diff here? Not a lot. The module decla

Re: including a file

2008-11-10 Thread Christopher Wright
Jarrett Billingsley wrote: On Sun, Nov 9, 2008 at 10:18 PM, James <[EMAIL PROTECTED]> wrote: i created to include file, 1 with 'module xxx' declaration and the other without it. but i still can import both files. what is the diff here? Not a lot. The module declaration doesn't serve much pu

Re: including a file

2008-11-10 Thread Frits van Bommel
Jarrett Billingsley wrote: On Sun, Nov 9, 2008 at 10:18 PM, James <[EMAIL PROTECTED]> wrote: i created to include file, 1 with 'module xxx' declaration and the other without it. but i still can import both files. what is the diff here? Not a lot. The module declaration doesn't serve much pu

Re: including a file

2008-11-10 Thread Bill Baxter
On Mon, Nov 10, 2008 at 1:59 PM, Jarrett Billingsley <[EMAIL PROTECTED]> wrote: > On Sun, Nov 9, 2008 at 10:18 PM, James <[EMAIL PROTECTED]> wrote: >> i created to include file, 1 with 'module xxx' declaration and the other >> without it. but i still can import both files. what is the diff here? >

Re: including a file

2008-11-09 Thread Jarrett Billingsley
On Sun, Nov 9, 2008 at 10:18 PM, James <[EMAIL PROTECTED]> wrote: > i created to include file, 1 with 'module xxx' declaration and the other > without it. but i still can import both files. what is the diff here? > Not a lot. The module declaration doesn't serve much purpose. The only things I

including a file

2008-11-09 Thread James
i created to include file, 1 with 'module xxx' declaration and the other without it. but i still can import both files. what is the diff here?