include file (common) access

 

Hi, I'm working with three different MetaEditors (A,B,C) and develop three different MT4-Programs (P1,P2,P3). All programs are using the following include-file 

#include <Lib_Base.mqh> (stored in the include-file-direcrory of A,B,C)

When I make changes in the include file (of A), I must copy the include file to the two other include-folders (B,C). 

Is it possible to (store) the (Lib_Base.mqh) in a special directory (or a common include-file directory) where all MetaEditors (A,B,C) (have access) and can load it.

Thank you for your answer.

 

I use LinkShell: http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html

to have common folders for several installation folders.

It uses Windows' hard links.

 
Alexander Hoch:

Hi, I'm working with three different MetaEditors (A,B,C) and develop three different MT4-Programs (P1,P2,P3). All programs are using the following include-file 

#include <Lib_Base.mqh> (stored in the include-file-direcrory of A,B,C)

When I make changes in the include file (of A), I must copy the include file to the two other include-folders (B,C). 

Is it possible to (store) the (Lib_Base.mqh) in a special directory (or a common include-file directory) where all MetaEditors (A,B,C) (have access) and can load it.

Thank you for your answer.

if you are sure to not edit the same file with multiple instances of MEditor, then you can safely use symbolic links to map one include directory into the other MQL5 directories.

In Windows it's called mklink, and can be invoked on CMD. Do a Google search for that.


If you intend to securely edit your files without loosing track which file you have been editing, and the ability to perform merges on different forks of the same file, you are better off using some version control system. In fact, I suggest using a version control anyways.

For this you have multiple options. Most easy to use is probably SVN (Google TortoiseSVN for windows). Other options are GitHub and CVS.

The MEditor built in system is based on SVN and I suggest using this with caution, as it is quite "buggy" in it's use, though for a single person might do the job.You can use the MQ storage with TortoiseSVN as a client, which works much more reliable.

Other than that, with GitHub Client like GitAhead and TortoiseSVN you can create local repositories on your preferred storage, be it internal HDD, USB Stick, Server Share or whatever you want to utilize.

But, you should learn to use these tools, you don't want to screw your code base.