Re: 4.0 include system question
- Posted by DerekParnell (admin) Aug 15, 2008
- 907 views
I think it will be fine once I get the hang of things.
The general rule is pretty simple really. If file X needs to see exported stuff that's in file Y, then X needs to include Y.
However, because some libraries are multi-file ones, the application user shouldn't need to know which particular library file the symbol comes from, just that it comes from the library. In that case, the library writer will provide a library file that simply includes all the library files that implement the library's API.
So, in you're case you are doing it right, namely that equity.e contains the lines
export include eqtso.e export include eqtmsg.e export include eqtc.e
Thus application coders just need to include equity.e. However, as the library author, if one of the library's component files needs to see things in another library component file, it needs to follow the general rule above.
In your case, as eqtc.e needs to see stuff in eqtso.e and eqtmsg.e, then eqtc.e must explicitly include both those files.