D.gnu - module
- gdc (13/13) Jan 17 2006 Hello,
- David Friedman (10/35) Jan 17 2006 This is a limitation of the gdc compiler which can only produce one
- nobody (3/44) Jan 17 2006 Thank you.
Hello, i have two programms: Haupt.d with code: import Module; void main() {} And Module.d with no line. I put the 2 files in the subdirectory example gdc example/Haupt.d example/Module.d -o example/Haupt I get the error message: example/Haupt.d:1: module Module cannot read file 'Module.d' If i compiled the programm in the directory example, it works fine. dmd example/Haupt.d example/Module.d compiled fine, without an error too.
Jan 17 2006
gdc wrote:Hello, i have two programms: Haupt.d with code: import Module; void main() {} And Module.d with no line. I put the 2 files in the subdirectory example gdc example/Haupt.d example/Module.d -o example/Haupt I get the error message: example/Haupt.d:1: module Module cannot read file 'Module.d' If i compiled the programm in the directory example, it works fine. dmd example/Haupt.d example/Module.d compiled fine, without an error too.This is a limitation of the gdc compiler which can only produce one object file at a time. Here are two workarounds: 1. Use the gdmd script and the -fall-sources option: gdmd -fall-sources example/Haupt.d example/Module.d The down side of -fall-sources is that it is much slower if there many source files on the command line. 2. Add the example directory to the module search path: gdc -I example example/Haupt.d example/Module.d -o example/Haupt David
Jan 17 2006
In article <dqk4dv$2c9b$1 digitaldaemon.com>, David Friedman says...gdc wrote:Thank you. Both examples run fine.Hello, i have two programms: Haupt.d with code: import Module; void main() {} And Module.d with no line. I put the 2 files in the subdirectory example gdc example/Haupt.d example/Module.d -o example/Haupt I get the error message: example/Haupt.d:1: module Module cannot read file 'Module.d' If i compiled the programm in the directory example, it works fine. dmd example/Haupt.d example/Module.d compiled fine, without an error too.This is a limitation of the gdc compiler which can only produce one object file at a time. Here are two workarounds: 1. Use the gdmd script and the -fall-sources option: gdmd -fall-sources example/Haupt.d example/Module.d The down side of -fall-sources is that it is much slower if there many source files on the command line. 2. Add the example directory to the module search path: gdc -I example example/Haupt.d example/Module.d -o example/Haupt David
Jan 17 2006