On Tuesday, 25 February 2020 at 21:48:00 UTC, Steven
Schveighoffer wrote:
On 2/25/20 4:31 PM, Marcel wrote:
Hello!
I have two libraries, where library B depends on library A,
where both libraries consist of multiple packages. Say my
project (I'm using VisualD) folder layout is the following:
C/:
libA
A_Package1
A_Package2
A_Package3
libB
B_Package1 - Imports from libA.Package2
B_Package2
B_Package3
Executable Module - Imports from libB.Package1
Why am I getting "Error: module "Package1" is in file
libA\Package2 which cannot be read" messages? I tried changing
the folder layout so that LibA is inside a dependencies folder
inside LibB, but nothing changed. What am I missing?
It would be most helpful to have actual messages, because you
might be missing something.
Several causes for such errors:
1. You are trying to read a file that it cannot find given the
command line parameters
2. The file has a module that is different from the actual
package/file it is in.
Could be something else too. Maybe you have the same package
name from both libraries? That should work, as long as you
don't define the same module in both packages.
-Steve
I can't give you the actual error messages right now, but both
libraries have packages that define modules with the same name.
For example, both libraries have packages with a module called
"utility.d". Unfortunately, this isn't the only thing that causes
compilation to fail though.