Include the second source file in the Chapel file

In C ++, when I need classes in 'actions.cpp' from classes.cpp, I include the header, for example #include <classes.h>. But the attempt use classes.chplfails, is there an equivalent .hthat I should use?

+4
source share
1 answer

Use only for module names, not for full file names. If your file classes.chpldoes not have an explicit module covering all its contents, enter

use classes;

to access its contents from another file.

If it classes.chplis in the same directory as the file with the use statement, this should be all that is needed to access its characters.

classes.chpl , -M --module-dir. , usesClasses.chpl classes.chpl, classes.chpl helpers,

chpl -M helpers/ usesClasses.chpl

+3

Source: https://habr.com/ru/post/1689483/


All Articles