Thread overview
June 14

I use dmd package.d -verrors=3 -debug -I"../..".

I get

Error: undefined reference to `std.container.array.Array!(minimal.token.token.Token).Array.empty() const`
       referenced from `const bool std.container.array.Array!(minimal.token.token.Token).Array.opEquals(ref const(std.container.array.Array!(minimal.token.token.Token).Array))`
June 14

On Saturday, 14 June 2025 at 00:25:13 UTC, mitgedanken wrote:

>

I use dmd package.d -verrors=3 -debug -I"../..".

I get

Error: undefined reference to `std.container.array.Array!(minimal.token.token.Token).Array.empty() const`
       referenced from `const bool std.container.array.Array!(minimal.token.token.Token).Array.opEquals(ref const(std.container.array.Array!(minimal.token.token.Token).Array))`

You need to include all modules on the command line that you import, or use the -i switch.

-Steve

June 14

On Saturday, 14 June 2025 at 13:46:20 UTC, Steven Schveighoffer wrote:

>

On Saturday, 14 June 2025 at 00:25:13 UTC, mitgedanken wrote:
[...]

You need to include all modules on the command line that you import, or use the -i switch.

-Steve

Oh, yes! I completely forgot about that.
Why isn't that the default behavior?!

June 15
On 15/06/2025 3:25 AM, mitgedanken wrote:
> On Saturday, 14 June 2025 at 13:46:20 UTC, Steven Schveighoffer wrote:
>> On Saturday, 14 June 2025 at 00:25:13 UTC, mitgedanken wrote:
>> [...]
>>
>> You need to include all modules on the command line that you import, or use the -i switch.
>>
>> -Steve
> 
> Oh, yes! I completely forgot about that.
> Why isn't that the default behavior?!

You may be linking against it separately.

The -i behavior only works for small executables, when the build commands (yes plural) get more complex its not going to give you the control that you need.

June 14

On Saturday, 14 June 2025 at 15:28:27 UTC, Richard (Rikki) Andrew Cattermole wrote:

>

On 15/06/2025 3:25 AM, mitgedanken wrote:

>

[...]

You may be linking against it separately.

The -i behavior only works for small executables, when the build commands (yes plural) get more complex its not going to give you the control that you need.

I thought that's what the flag -Iā€œ...ā€ was for. Provided the naming conforms to the standard.

June 15
On 15/06/2025 5:42 AM, mitgedanken wrote:
> On Saturday, 14 June 2025 at 15:28:27 UTC, Richard (Rikki) Andrew Cattermole wrote:
>> On 15/06/2025 3:25 AM, mitgedanken wrote:
>>> [...]
>>
>> You may be linking against it separately.
>>
>> The -i behavior only works for small executables, when the build commands (yes plural) get more complex its not going to give you the control that you need.
> 
> I thought that's what the flag ``-Iā€œ...ā€`` was for. Provided the naming conforms to the standard.

-i uses the import path switches to source files from.

By default the D compiler defaults to looking in current working directory, hence why -i by itself works.