Re: Passing directory as compiler argument not finding file

2018-04-13 Thread Cym13 via Digitalmars-d-learn
On Friday, 13 April 2018 at 13:39:23 UTC, Tony wrote: On Friday, 13 April 2018 at 12:46:32 UTC, Cym13 wrote: On Friday, 13 April 2018 at 01:27:06 UTC, Tony wrote: I think that the typical model (at least in other languages) is to only compile one D source file at a time. Compile the b.d file w

Re: Passing directory as compiler argument not finding file

2018-04-13 Thread Tony via Digitalmars-d-learn
On Friday, 13 April 2018 at 12:46:32 UTC, Cym13 wrote: On Friday, 13 April 2018 at 01:27:06 UTC, Tony wrote: I think that the typical model (at least in other languages) is to only compile one D source file at a time. Compile the b.d file with the -c option to create an object file. Then put t

Re: Passing directory as compiler argument not finding file

2018-04-13 Thread Cym13 via Digitalmars-d-learn
On Friday, 13 April 2018 at 01:27:06 UTC, Tony wrote: I think that the typical model (at least in other languages) is to only compile one D source file at a time. Compile the b.d file with the -c option to create an object file. Then put the object file in a library file (either static (easier)

Re: Passing directory as compiler argument not finding file

2018-04-12 Thread Tony via Digitalmars-d-learn
On Thursday, 12 April 2018 at 07:48:28 UTC, Jamie wrote: Really, it's more like: A/ a.d module A.a; import std.stdio; import B.b; void main() { writeln(f(4)); } B/ b.d module B.b; size_t f(size_t input) { return input * 2; } And in A/ I

Re: Passing directory as compiler argument not finding file

2018-04-12 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 12 April 2018 at 07:48:28 UTC, Jamie wrote: On Thursday, 12 April 2018 at 06:30:25 UTC, Tony wrote: On Thursday, 12 April 2018 at 05:39:21 UTC, Jamie wrote: Am I using the -I compiler option incorrectly? I believe so. I think it is for finding import files, not the files you ar

Re: Passing directory as compiler argument not finding file

2018-04-12 Thread Jamie via Digitalmars-d-learn
On Thursday, 12 April 2018 at 06:30:25 UTC, Tony wrote: On Thursday, 12 April 2018 at 05:39:21 UTC, Jamie wrote: Am I using the -I compiler option incorrectly? I believe so. I think it is for finding import files, not the files you are compiling. ---

Re: Passing directory as compiler argument not finding file

2018-04-11 Thread Tony via Digitalmars-d-learn
On Thursday, 12 April 2018 at 05:39:21 UTC, Jamie wrote: Am I using the -I compiler option incorrectly? I believe so. I think it is for finding import files, not the files you are compiling. - -I=directory Look for imports also in

Re: Passing directory as compiler argument not finding file

2018-04-11 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 12 April 2018 at 06:22:30 UTC, Nicholas Wilson wrote: On Thursday, 12 April 2018 at 05:39:21 UTC, Jamie wrote: Am I using the -I compiler option incorrectly? is it thinking /../A is an absolute path? try -I=./../A Er, scratch that. I see you already tried it.

Re: Passing directory as compiler argument not finding file

2018-04-11 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 12 April 2018 at 05:39:21 UTC, Jamie wrote: With a directory structure as follows: run/ A/ a.d Where a.d is: === module A.d; I'm attempting to compile from the run/ directory. If I run with dmd ../A/a.d it compiles successfully, however if I p

Passing directory as compiler argument not finding file

2018-04-11 Thread Jamie via Digitalmars-d-learn
With a directory structure as follows: run/ A/ a.d Where a.d is: === module A.d; I'm attempting to compile from the run/ directory. If I run with dmd ../A/a.d it compiles successfully, however if I pass it the directory dmd -I=../A a.d it doesn't compi