Re: confusion about include
- Posted by ne1uno Aug 07, 2010
- 1257 views
Jerry_Story said...
In the good old days when Euphoria was simple, 'include' included files for the entire rest of the program. So I could do this:
-- main file include GtkEngine.e include myfile1.e -- GtkEngine.e would be recognized in each of these files. include myfile2.e include myfile3.e -- bunchuv code -- end main file
Now it's different:
thinking about your question a little more, and not having tried latest EUGTK4 available, if your main file is only going to use public and global symbols from GtkEngine.e and BTW, that is all it should ever need as a library consumer, then try it like this:
-- myfile1.e public include GtkEngine.e -- can use public, export in GtkEngine, and global routines from EUGTK4 -- passes only public, and global routines to any file that does include file1.e -- more code -- end myfile1.e -- main file include myfile1.e -- set up Gtk include myfile2.e -- needs include GtkEngine.e to use export or public GTK -- here can use public,and global EUGTK4 routines, none of export -- bunchuv code -- end main file
EUGTK4 local --x-- file1 EUGTK4 export ----> file1 --x-- main EUGTK4 global ----> file1 -----> main -----> EUGTK4 public ----> file1 -----> main --x-- EUGTK4 export --x-- file2 EUGTK4 global ----> file2 ----> file3 EUGTK4 public --x-- file2