digitalmars.D.learn - undefined reference to
- mitgedanken (8/8) Jun 13 I use ``dmd package.d -verrors=3 -debug -I"../.."``.
- Steven Schveighoffer (4/12) Jun 14 You need to include all modules on the command line that you
- mitgedanken (4/9) Jun 14 Oh, yes! I completely forgot about that.
- Richard (Rikki) Andrew Cattermole (5/16) Jun 14 You may be linking against it separately.
- mitgedanken (4/10) Jun 14 I thought that's what the flag ``-I“...”`` was for. Provided the
- Richard (Rikki) Andrew Cattermole (4/17) Jun 14 -i uses the import path switches to source files from.
I use ``dmd package.d -verrors=3 -debug -I"../.."``. I get ```sh 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))` ```
Jun 13
On Saturday, 14 June 2025 at 00:25:13 UTC, mitgedanken wrote:I use ``dmd package.d -verrors=3 -debug -I"../.."``. I get ```sh 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
Jun 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. -SteveOh, yes! I completely forgot about that. Why isn't that the default behavior?!
Jun 14
On 15/06/2025 3:25 AM, mitgedanken wrote:On Saturday, 14 June 2025 at 13:46:20 UTC, Steven Schveighoffer 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.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. -SteveOh, yes! I completely forgot about that. Why isn't that the default behavior?!
Jun 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:I thought that's what the flag ``-I“...”`` was for. Provided the naming conforms to the standard.[...]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.
Jun 14
On 15/06/2025 5:42 AM, mitgedanken wrote:On Saturday, 14 June 2025 at 15:28:27 UTC, Richard (Rikki) Andrew Cattermole wrote:-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.On 15/06/2025 3:25 AM, mitgedanken wrote:I thought that's what the flag ``-I“...”`` was for. Provided the naming conforms to the standard.[...]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.
Jun 14