How to use classes from another d files

Vinod K Chandran kcvinu82 at gmail.com
Tue Oct 22 18:21:36 UTC 2019


On Tuesday, 22 October 2019 at 17:40:11 UTC, Arun Chandrasekaran 
wrote:
> On Tuesday, 22 October 2019 at 17:34:51 UTC, Vinod K Chandran 
> wrote:
>> Hi all,
>> I am new to D. But some fair experience with vb.net. I was 
>> playing with D classes.  I wrote a class in a D file.
>> The file name is "classFile.d"
>> ```D
>> class TestClass {
>>
>> [...]
>
> What you are seeing is a linker error. Build it as follows:
>
> dmd caller.d classFile.d
>
> Unrelated, first line of classFile.d needs be `module classFile`

Thanks a lot. But what if there is too many include files ? Say, 
i have 10 files to import in main file, Do i need to type all the 
file names in cmd ?
Is there any dedicated ide in order to avoid this typing task ? I 
have tested it with Codeblocks, but didn't worked.


More information about the Digitalmars-d-learn mailing list