Re: How to use the -I command line switch?

2018-01-03 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 3 January 2018 at 22:52:10 UTC, Seb wrote: Which documentation are you referring to? If it's the specification, just click "edit". I know how to edit it. I just don't know how to word it so that it isn't so confusing.

Re: How to use the -I command line switch?

2018-01-03 Thread Seb via Digitalmars-d-learn
On Wednesday, 3 January 2018 at 21:51:07 UTC, jmh530 wrote: On Wednesday, 3 January 2018 at 18:35:21 UTC, Ali Çehreli wrote: -I is for import directives only. imports are needed to compile the importing module. All other modules still need to be compiled themselves and added to the program ei

Re: How to use the -I command line switch?

2018-01-03 Thread Tony via Digitalmars-d-learn
On Wednesday, 3 January 2018 at 12:21:28 UTC, tipdbmp wrote: // C:\libs\my_module.d module my_module; void foo() {} // main.d module main; import my_module; void main() { foo(); } Running dmd with: dmd -IC:\libs main.d my_module.d I get: Error: module my_module is in file 'my_modu

Re: How to use the -I command line switch?

2018-01-03 Thread Ali Çehreli via Digitalmars-d-learn
On 01/03/2018 01:42 PM, Tony wrote: > On Wednesday, 3 January 2018 at 18:35:21 UTC, Ali Çehreli wrote: >> Working as expected... :) >> > What about the error message? If -I is only for DMD finding "import ..." > files, and not files on the command line, why does DMD list what was in > the -I "w

Re: How to use the -I command line switch?

2018-01-03 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 3 January 2018 at 18:35:21 UTC, Ali Çehreli wrote: -I is for import directives only. imports are needed to compile the importing module. All other modules still need to be compiled themselves and added to the program either as individual .o files or as libraries (e.g. .a, .lib,

Re: How to use the -I command line switch?

2018-01-03 Thread Tony via Digitalmars-d-learn
On Wednesday, 3 January 2018 at 18:35:21 UTC, Ali Çehreli wrote: On 01/03/2018 09:10 AM, tipdbmp wrote: dmd main.d C:\libs\my_module.d That does not use the -I switch. It compiles if I specify the full path to my_module.d:     dmd -IC:\libs main.d C:\libs\my_module.d I don't understand the e

Re: How to use the -I command line switch?

2018-01-03 Thread Ali Çehreli via Digitalmars-d-learn
On 01/03/2018 09:10 AM, tipdbmp wrote: dmd main.d C:\libs\my_module.d That does not use the -I switch. It compiles if I specify the full path to my_module.d:     dmd -IC:\libs main.d C:\libs\my_module.d I don't understand the error message though. -I is for import directives only. imports

Re: How to use the -I command line switch?

2018-01-03 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 3 January 2018 at 17:10:22 UTC, tipdbmp wrote: dmd main.d C:\libs\my_module.d That does not use the -I switch. It compiles if I specify the full path to my_module.d: dmd -IC:\libs main.d C:\libs\my_module.d I don't understand the error message though. I tried a few other op

Re: How to use the -I command line switch?

2018-01-03 Thread tipdbmp via Digitalmars-d-learn
dmd main.d C:\libs\my_module.d That does not use the -I switch. It compiles if I specify the full path to my_module.d: dmd -IC:\libs main.d C:\libs\my_module.d I don't understand the error message though.

Re: How to use the -I command line switch?

2018-01-03 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 3 January 2018 at 12:21:28 UTC, tipdbmp wrote: // C:\libs\my_module.d module my_module; void foo() {} // main.d module main; import my_module; void main() { foo(); } Running dmd with: dmd -IC:\libs main.d my_module.d I get: Error: module my_module is in file 'my_modu

How to use the -I command line switch?

2018-01-03 Thread tipdbmp via Digitalmars-d-learn
// C:\libs\my_module.d module my_module; void foo() {} // main.d module main; import my_module; void main() { foo(); } Running dmd with: dmd -IC:\libs main.d my_module.d I get: Error: module my_module is in file 'my_module.d' which cannot be read import path[0] = C:\libs