How to clone a project and configure it to compile

The projects have no makefile, but rather are intended to be imported as a project into Netbeans, Eclipse, or a similar IDE which auto-generates the makefile. The developers of VMS use netbeans, so the wiki pages all give instructions for setting up netbeans projects.

A project is organized as a collection of separate mercurial repositories. The top level directory is the overall "project repository", which has a .hgsub file that defines where all the other repositories reside in the directory structure.

The idea is that one clones the top-level project repository, which then automatically clones the sub-repositories, then updates to the version of them that builds the project correctly.

(If curious, see Pattern for full project Directories for more info on the reasoning behind the structure).

Cloning the Source

To clone a project, browse the repositories at The top level project repositories all begin with: VMS/VMS_Projects/ and as of June 2012, only multi-core shared projects are available: VMS_Projects__MC_shared/. Once you choose a project, click on it, then copy the URL, and paste it into your "hg clone <URL>" command, or into the appropriate field of the TortoiseHg diaglog for clone.

Once the project is cloned, it should have a file of the pattern "__brch__<nameOfBrch>".. normally "__brch__default". See branch naming for more on the naming of branches. If you want a different branch, update to it. Even if you want to stay on the default branch, be sure the project repository is updated to the most recent version (Tortoise workbench is a nice tool for browsing repositories and seeing the branches and versions). At this point, the source is ready to be imported into an IDE and compiled.


The standard tool for VMS development is netbeans, to get it, download from Be sure to get the version that has C/C++ development. Once installed and running, here are some notes on setting up properties of the netbeans project:

  • In netbeans, to import the code, do not use the intuitive "New project with existing files" rather, instead either use the File menu or right-click in the project tab and selects "New Project" then "C/C++ Application". This brings up a dialog, in which one can choose the location and name o the directory holding the netbeans project info and the build. The directory can be placed anywhere, and named anything. But be sure to uncheck the "Create Main file" checkbox. If you forget, the file "main.cpp" will be placed in the top netbeans project directory and you'll have to delete it. After project creation is complete, it should appear expanded in the project tab. Select the "Source Files" and right-click on it.. in the menu select "add existing items from folder", and navigate to the cloned project directory, and choose the "src" directory. That imports all the source code into the netbeans project.
  • Next, include directories have to be set up for the project. Right click on the project name (not the "Source Files") and select "properties", which brings up a dialog. In that, expand the "Build" bullet and select "C compiler". Under this, click on the "..." to the right of "include directories", which brings up a dialog box. In the dialog, click "add", navigate to the src folder, expand it, and select the "C_Libraries" directory. Repeat for the "VMS_Implementations" directory and the "src" directory itself. The reason for this is to treat each of the separate repositories as static libraries, so that none of them assume the directory structure.
  • Lastly, click on the "Linker" bullet, then the "..." to the right of "Libraries". This brings up a dialog box, click on "add standard library" button and choose "posix threads" and then repeat for "mathematics".

If you experience odd compilation errors, chances are there is an issue with the revisions that the repositories are updated to. Double checking that you're updated to the branch of the project you want, and that the sub-repositories are on the latest revision.

  • To get a project to run, there are often configuration files or other forms of input needed. Check the notes for the particular project to get the names and paths of these input files. They will all appear in the repository, and netbeans will always need to be configured to have the root of this repository be the working directory. This page says how to get the repo and configure netbeans.