diff --git a/pub/lib/commands.cpp b/pub/lib/commands.cpp
index 464a7866e0882b6c4995f3be76ad7c0f2691eb74..216be01ed47d68112c3a3317412396846a87ed9a 100644
--- a/pub/lib/commands.cpp
+++ b/pub/lib/commands.cpp
@@ -38,6 +38,7 @@
 #include "reduce_spec.hpp"
 #include "rssm.hpp"
 #include "special.hpp"
+#include "commands.hpp"
 
 
 //! Executes cmd if is a Frida command, and returns true when successful.
diff --git a/pub/lib/commands.hpp b/pub/lib/commands.hpp
index 1546b3d98d081446f02c2d3c56fa81953bd94930..0dc8e7920ecb4d36e89c42dbff9c41882b99f27a 100644
--- a/pub/lib/commands.hpp
+++ b/pub/lib/commands.hpp
@@ -7,4 +7,9 @@
 //! \file  commands.hpp
 //! \brief Function fridaCommand: executes one main-level command.
 
+#ifndef COMMANDS_H
+#define COMMANDS_H
+
 bool frida_command(string cmd);
+
+#endif // COMMANDS_H
diff --git a/pub/lib/coord.hpp b/pub/lib/coord.hpp
index 3a0c7a6c9fe2e83e660935adfd9e4ad8e82d7c99..42249cbcaa55a1f553fc6420bbf7aaf8fef7199c 100644
--- a/pub/lib/coord.hpp
+++ b/pub/lib/coord.hpp
@@ -7,6 +7,8 @@
 //! \file  coord.hpp
 //! \brief Coordinates CCoord, numeric parameters CParam.
 
+#ifndef COORD_H
+#define COORD_H
 
 //! A coordinate, consisting of a name and a unit.
 
@@ -56,4 +58,5 @@ public:
         : Co(CCoord(_name, _unit)), val(_val), dval(_dval)
     {
     }
-};
\ No newline at end of file
+};
+#endif // COORD_H
diff --git a/pub/lib/curve.cpp b/pub/lib/curve.cpp
index f4c6c3cdde658c38997f2fc4cf80a7312c090795..e170a546de2aecaea5030046273a12be1db68244 100644
--- a/pub/lib/curve.cpp
+++ b/pub/lib/curve.cpp
@@ -13,7 +13,6 @@
 
 #include "../readplus/ask.hpp"
 
-#include "curve.hpp"
 #include "expr.hpp"
 #include "fsel.hpp"
 #include "loop.hpp"
@@ -23,6 +22,7 @@
 #include "opr.hpp"
 #include "slice.hpp"
 #include "xax_lex.hpp"
+#include "curve.hpp"
 
 using boost::format;
 
diff --git a/pub/lib/curve.hpp b/pub/lib/curve.hpp
index f8c9461bc01fcd5c570d172f05a0482a216ed927..9b0c781bd45818679b24090a52b6cfefe7521603 100644
--- a/pub/lib/curve.hpp
+++ b/pub/lib/curve.hpp
@@ -7,6 +7,9 @@
 //! \file  curve.hpp
 //! \brief NCurveFile: Methods to create, inspect, modify curve files.
 
+#ifndef CURVE_H
+#define CURVE_H
+
 class CSpec;
 
 //! Methods to create, inspect, modify curve files.
@@ -30,3 +33,5 @@ void set_par_attr(char attr);
 
 void get_conv(const CSpec** sv, int* kv, int* jv, int k, int j);
 }
+
+#endif // CURVE_H
diff --git a/pub/lib/defs.hpp b/pub/lib/defs.hpp
index 043855bdbdc3cc9af0a1afefae82db9a85481b99..0b6e3696a737a416ed87fe21c926cd4a35c3f104 100644
--- a/pub/lib/defs.hpp
+++ b/pub/lib/defs.hpp
@@ -13,8 +13,8 @@
 #include <iostream>
 #include <map>
 #include <vector>
-
 #include "../trivia/string_convs.hpp"
+
 #define S(a) triv::strg((a))
 
 #define SQR(a) ((a) * (a))
diff --git a/pub/lib/edif.cpp b/pub/lib/edif.cpp
index 8b37097dbd0396c6a8c2b3178c6de7713ba5dce2..2267999b381a623f70c746be00c5b7e7d0593b67 100644
--- a/pub/lib/edif.cpp
+++ b/pub/lib/edif.cpp
@@ -17,7 +17,6 @@
 #include "../trivia/string_ops.hpp"
 #include "../trivia/vector_ops.hpp"
 
-#include "edif.hpp"
 #include "fsel.hpp"
 #include "genus.hpp"
 #include "loop.hpp"
@@ -25,6 +24,7 @@
 #include "obj.hpp"
 #include "olf.hpp"
 #include "slice.hpp"
+#include "edif.hpp"
 
 using boost::format;
 
diff --git a/pub/lib/edif.hpp b/pub/lib/edif.hpp
index 591adbb1889f37777373fa6bebcfad951b9aa3f4..97f6a1415591587f9b0e9bd9a307ac843a487bae 100644
--- a/pub/lib/edif.hpp
+++ b/pub/lib/edif.hpp
@@ -7,6 +7,9 @@
 //! \file  edif.hpp
 //! \brief NEdif: Methods to inspect and edit data and metadata.
 
+#ifndef EDIF_H
+#define EDIF_H
+
 
 //! Methods to inspect and edit data and metadata.
 
@@ -23,3 +26,5 @@ void edit_coord(string which);
 void edit_doc();
 void del_numpar();
 }
+
+#endif // EDIF_H
diff --git a/pub/lib/expr.hpp b/pub/lib/expr.hpp
index 618cf9e1929e7d1330bb929b4f0744ae63291c85..d5a1ff1975b7f460699fb9b1c3e47ec8eba6098b 100644
--- a/pub/lib/expr.hpp
+++ b/pub/lib/expr.hpp
@@ -7,6 +7,12 @@
 //! \file  expr.hpp
 //! \brief Expressions are parsed into CRef, CContext, CObj, virtual CNode.
 
+#ifndef EXPR_H
+#define EXPR_H
+
+#include "coord.hpp"
+#include "ptr.hpp"
+
 //! The context in which a CNode shall be evaluated.
 
 class CContext
@@ -104,3 +110,5 @@ public:
 
     static RObj eval(string expr);
 };
+
+#endif // EXPR_H
diff --git a/pub/lib/file_in.hpp b/pub/lib/file_in.hpp
index 4be81539f85b34255702df14524666cff6d10703..15387637b41cf426f5dc0ca37fbfcef69cbaea56 100644
--- a/pub/lib/file_in.hpp
+++ b/pub/lib/file_in.hpp
@@ -7,10 +7,14 @@
 //! \file  file_in.hpp
 //! \brief NFileIn: load files
 
+#ifndef FILE_IN_H
+#define FILE_IN_H
+
 
 //! Method to load files, with support for various old formats.
 
 namespace NFileIn
 {
 void load();
-}
\ No newline at end of file
+}
+#endif // FILE_IN_H
diff --git a/pub/lib/file_out.hpp b/pub/lib/file_out.hpp
index e6377f8a438406228aef0fd07890dd6435fe6042..fcfca02cc936f021bd6fe0a3576216fe5072436e 100644
--- a/pub/lib/file_out.hpp
+++ b/pub/lib/file_out.hpp
@@ -7,10 +7,14 @@
 //! \file  file_out.hpp
 //! \brief NFileOut: write files.
 
+#ifndef FILE_OUT_H
+#define FILE_OUT_H
+
 
 //! Method to save files.
 
 namespace NFileOut
 {
 void save(string fmt, bool allow_overwrite = false);
-}
\ No newline at end of file
+}
+#endif // FILE_OUT_H
diff --git a/pub/lib/fit.hpp b/pub/lib/fit.hpp
index 9c1ccd9fd4ff874e6631347821a9602910123d70..94876d7255518940dbc6d51645be8b9db02ef0ac 100644
--- a/pub/lib/fit.hpp
+++ b/pub/lib/fit.hpp
@@ -7,6 +7,9 @@
 //! \file  fit.hpp
 //! \brief NCurveFit: fit a curve file to a data file
 
+#ifndef FIT_H
+#define FIT_H
+
 
 //! Methods related to fitting.
 
@@ -15,3 +18,5 @@ namespace NCurveFit
 void set_fit_tuning_pars(string which);
 void fit(bool _allow_slow_conv);
 }
+
+#endif // FIT_H
diff --git a/pub/lib/fregistry.hpp b/pub/lib/fregistry.hpp
index 4b06d44078e1ff530ca2280c6ecb1748e3a06579..93a6288f878df403b9541bdba53f3c47529494f4 100644
--- a/pub/lib/fregistry.hpp
+++ b/pub/lib/fregistry.hpp
@@ -7,6 +7,10 @@
 //! \file  fregistry.hpp
 //! \brief Registration of CFunc's.
 
+#ifndef FREGISTRY_H
+#define FREGISTRY_H
+
+#include "func.hpp"
 #include "registry.hpp"
 
 //  Low-level function types.
@@ -193,3 +197,5 @@ public:
         register_fct_template(_m, "e", "eee", (funcPtr)_f);
     }
 };
+
+#endif // FREGISTRY_H
diff --git a/pub/lib/fsel.hpp b/pub/lib/fsel.hpp
index 0b2a9090093fccbc6dbd6196da02cfa9e7fba024..7d40e930521552b156014900c387d38bb3189cb8 100644
--- a/pub/lib/fsel.hpp
+++ b/pub/lib/fsel.hpp
@@ -7,8 +7,15 @@
 //! \file  fsel.hpp
 //! \brief Declare online file selection
 
+#ifndef FSEL_H
+#define FSEL_H
+
+#include "fsel.hpp"
+#include "ptr.hpp"
 #include "registry.hpp"
 
+class COlo;
+
 //! Online memory and the default file selection.
 
 class SFSel : public triv::ISingleton<SFSel>
@@ -33,3 +40,5 @@ public:
     void sel_collect_end();
     void sel_increment(int step);
 };
+
+#endif // FSEL_H
diff --git a/pub/lib/func.hpp b/pub/lib/func.hpp
index c29efc5116c49b17d9547a85ddcd9989544bac85..cb8cfa3378af2bfe85ffc81c158d58178952d9c3 100644
--- a/pub/lib/func.hpp
+++ b/pub/lib/func.hpp
@@ -7,6 +7,9 @@
 //! \file  func.hpp
 //! \brief Function wrapper classes CTypedFunc and CFunc.
 
+#ifndef FUNC_H
+#define FUNC_H
+
 //! A wrapper holding a function with given input and output types.
 
 typedef void (*funcPtr)(void); // generic pointer-to-function type
@@ -59,3 +62,5 @@ public:
     class CCoord coord(const CCoord& co1, const CCoord& co2) const;
     class CCoord coord(const CCoord& co1, const CCoord& co2, const CCoord& co3) const;
 };
+
+#endif // FUNC_H
diff --git a/pub/lib/genus.cpp b/pub/lib/genus.cpp
index 2ade5f7edd11217357c1b350e7533146b1c01f3e..5365c4820364fb311dee72306e87201f2a299107 100644
--- a/pub/lib/genus.cpp
+++ b/pub/lib/genus.cpp
@@ -7,9 +7,10 @@
 //! \file  genus.cpp
 //! \brief Variable reference CGenus.
 
-#include "genus.hpp"
 #include "defs.hpp"
 
+#include "genus.hpp"
+
 
 //**************************************************************************************************
 //*  class CGenus
diff --git a/pub/lib/genus.hpp b/pub/lib/genus.hpp
index 14e4a677ef5d1486934395037a925ff88b566240..252fdccfb1b960d48d0fdadc91f3cc8b8db923a0 100644
--- a/pub/lib/genus.hpp
+++ b/pub/lib/genus.hpp
@@ -7,6 +7,9 @@
 //! \file  genus.hpp
 //! \brief Variable reference CGenus.
 
+#ifndef GENUS_H
+#define GENUS_H
+
 
 //! Variable category.
 
@@ -62,3 +65,5 @@ public:
 private:
     static int request_num(string s, int pos);
 };
+
+#endif // GENUS_H
diff --git a/pub/lib/import.hpp b/pub/lib/import.hpp
index 1fbbe285beea201370c298e574e94185f297f106..a83e093199176a8f92fecafce81e3645eca471cf 100644
--- a/pub/lib/import.hpp
+++ b/pub/lib/import.hpp
@@ -7,6 +7,9 @@
 //! \file  import.hpp
 //! \brief NImport: import tables or make data ex nihilo
 
+#ifndef IMPORT_H
+#define IMPORT_H
+
 
 //! Import tables or make data ex nihilo.
 
@@ -15,3 +18,5 @@ namespace NImport
 void read_tab(string qualif);
 void make_grid();
 }
+
+#endif // IMPORT_H
diff --git a/pub/lib/jsel.hpp b/pub/lib/jsel.hpp
index 9fd893f71195ee08cbe1cc6d3d4cf08e21b0cea0..ea3a637f96494626f6ee46e45224ef484fb2fc72 100644
--- a/pub/lib/jsel.hpp
+++ b/pub/lib/jsel.hpp
@@ -7,5 +7,10 @@
 //! \file  jsel.hpp
 //! \brief Selection of spec/curve index j.
 
+#ifndef JSEL_H
+#define JSEL_H
+
 
 void JSelAsk(string quest, vector<int>& JSel);
+
+#endif // JSEL_H
diff --git a/pub/lib/loop.cpp b/pub/lib/loop.cpp
index c53be658f43c4d6baefa7332b4f6015d26fb08a1..4bed01fe53171cad495afdeb6425b7fb7ad29b5b 100644
--- a/pub/lib/loop.cpp
+++ b/pub/lib/loop.cpp
@@ -7,11 +7,13 @@
 //! \file  loop.cpp
 //! \brief Implements iterator over file selection.
 
-#include "loop.hpp"
 #include "defs.hpp"
+
 #include "mem.hpp"
 #include "olf.hpp"
 
+#include "loop.hpp"
+
 FileIterator::FileIterator(const vector<int>& _Sel, bool tolerate_empty)
 {
     Sel = _Sel;
diff --git a/pub/lib/loop.hpp b/pub/lib/loop.hpp
index cbb52bd9fd7d1d4670b8492eb2e0172d1b4c3fa6..49d185d5dc28b7bd303315e3226160a6c83af237 100644
--- a/pub/lib/loop.hpp
+++ b/pub/lib/loop.hpp
@@ -7,6 +7,13 @@
 //! \file  loop.hpp
 //! \brief Declares iterator over file selection.
 
+#ifndef LOOP_H
+#define LOOP_H
+
+class COlo;
+class COld;
+class COlc;
+
 
 //! Iterate over all files in selection.
 
@@ -42,3 +49,5 @@ public:
         return currentC();
     }
 };
+
+#endif // LOOP_H
diff --git a/pub/lib/manip.hpp b/pub/lib/manip.hpp
index 0e169e07240f2c935d297d4942433bac4c37f741..73a672f2382cc43f084c83491af2aef4aa63db2c 100644
--- a/pub/lib/manip.hpp
+++ b/pub/lib/manip.hpp
@@ -7,6 +7,9 @@
 //! \file  manip.hpp
 //! \brief NManip: manipulate data (select, bin, sort, ...)
 
+#ifndef MANIP_H
+#define MANIP_H
+
 //! Manipulate data (select, bin, sort, ...)
 
 namespace NManip
@@ -37,3 +40,5 @@ void files_merge(const string& opts);
 void files_merge_pointwise();
 void interpolate();
 }
+
+#endif // MANIP_H
diff --git a/pub/lib/mem.hpp b/pub/lib/mem.hpp
index 6be9b8458325d057b92b2409ee3782f1ae2f95f0..33722c7928afff6045b6f99f1b94f0ac16e4289d 100644
--- a/pub/lib/mem.hpp
+++ b/pub/lib/mem.hpp
@@ -7,8 +7,16 @@
 //! \file  mem.hpp
 //! \brief Declare online memory
 
+#ifndef MEM_H
+#define MEM_H
+
+#include "ptr.hpp"
 #include "registry.hpp"
 
+class COlo;
+class COld;
+class COlc;
+
 //! Online memory and the default file selection.
 
 class SMem : public triv::ISingleton<SMem>
@@ -32,3 +40,5 @@ public:
     void mem_xchange();
     void mem_copy();
 };
+
+#endif // MEM_H
diff --git a/pub/lib/node.hpp b/pub/lib/node.hpp
index d32103dbbefeb0f70d923d7679e3d80c229b4cda..230dcd22ea0f103710f8a193c00b6b67625be645 100644
--- a/pub/lib/node.hpp
+++ b/pub/lib/node.hpp
@@ -7,6 +7,9 @@
 //! \file  node.hpp
 //! \brief nodes within expression trees, inheriting from virtual base CNode
 
+#ifndef NODE_H
+#define NODE_H
+
 //! Base class CNode is declared elsewhere (expr.hpp).
 
 
@@ -568,3 +571,5 @@ public:
     CCoord node_coord(int k) const;
     string tree_info() const { return "resol(" + shift->tree_info() + ")"; }
 };
+
+#endif // NODE_H
diff --git a/pub/lib/obj.hpp b/pub/lib/obj.hpp
index e1d2e20ae4050c03734612499fa0dbf6200fced4..00c0008b65de86f942b7635c13146ec6db12396b 100644
--- a/pub/lib/obj.hpp
+++ b/pub/lib/obj.hpp
@@ -7,7 +7,12 @@
 //! \file  obj.hpp
 //! \brief Data containers: CObj and its children.
 
+#ifndef OBJ_H
+#define OBJ_H
+
 #include <cmath>
+#include "defs.hpp"
+#include "ptr.hpp"
 
 //! Generic data container, pure virtual base class.
 
@@ -212,3 +217,5 @@ public:
     inline double to_dr(int i) const { return dv[i]; }
     string to_s(int maxlen = 12, int minlen = 1, int prec = 6) const;
 };
+
+#endif // OBJ_H
diff --git a/pub/lib/olf.hpp b/pub/lib/olf.hpp
index 77c4481aced30b7c11ba9366a2b981944615e750..1f292bbd2fbff32e893d7e494ab437a6ddcdb0a0 100644
--- a/pub/lib/olf.hpp
+++ b/pub/lib/olf.hpp
@@ -7,6 +7,9 @@
 //! \file  olf.hpp
 //! \brief COlo, COld, COld online files
 
+#ifndef OLF_H
+#define OLF_H
+
 #include "coord.hpp"
 #include "ptr.hpp"
 
@@ -160,3 +163,5 @@ public:
     RObj eval_curve_scalar(double arg, int k, int j, bool want_error) const;
     virtual string type() const { return "curve"; }
 };
+
+#endif // OLF_H
diff --git a/pub/lib/opr.hpp b/pub/lib/opr.hpp
index 0b47d44f690328f5f1bac3425d3162c0046b122f..2e51d9996ad0434f7a173e3754c73fcb1efe2db2 100644
--- a/pub/lib/opr.hpp
+++ b/pub/lib/opr.hpp
@@ -7,6 +7,9 @@
 //! \file  opr.hpp
 //! \brief NOperate: functional operations.
 
+#ifndef OPR_H
+#define OPR_H
+
 
 //! Functional operations.
 
@@ -18,4 +21,5 @@ void Pointwise(string llabel);
 void Integral();
 void IntXY(string mode);
 void Functional(const string& subcmd);
-}
\ No newline at end of file
+}
+#endif // OPR_H
diff --git a/pub/lib/plot.hpp b/pub/lib/plot.hpp
index 5ff09a88f3dcbafaa26ff337e542e857e304a693..74849502c1941638ed96ed1a053c4e9e0a6db13d 100644
--- a/pub/lib/plot.hpp
+++ b/pub/lib/plot.hpp
@@ -7,10 +7,14 @@
 //! \file  plot.hpp
 //! \brief NPlot: plot data and curves.
 
+#ifndef PLOT_H
+#define PLOT_H
+
 
 //! Plot data and curves.
 
 namespace NPlot
 {
 void plot(class CPlot* plot, bool add, const string& mode = "ask");
-}
\ No newline at end of file
+}
+#endif // PLOT_H
diff --git a/pub/lib/ptr.hpp b/pub/lib/ptr.hpp
index 7dbbd262d876194f3b408f15b1e45d975772af1a..d2a260ffbde1c3da8d430178ae9719b6af98b953 100644
--- a/pub/lib/ptr.hpp
+++ b/pub/lib/ptr.hpp
@@ -7,6 +7,9 @@
 //! \file  ptr.hpp
 //! \brief pointer forward declarations POlo, PNode, and so on (.h file only)
 
+#ifndef PTR_H
+#define PTR_H
+
 #include <memory>
 
 #define PCAST std::dynamic_pointer_cast
@@ -39,3 +42,5 @@ using PCurve = std::unique_ptr<class CCurve>;
 
 using RNode = std::shared_ptr<const class CNode>;
 using RRef = std::shared_ptr<const class CRef1>;
+
+#endif // PTR_H
diff --git a/pub/lib/reduce_curv.hpp b/pub/lib/reduce_curv.hpp
index 5233bc26fc742e26298d2b1deb798f5e83ab9256..fdb91034e24b274767bd5762eb168e155b4f806d 100644
--- a/pub/lib/reduce_curv.hpp
+++ b/pub/lib/reduce_curv.hpp
@@ -7,6 +7,9 @@
 //! \file  reduce_curv.hpp
 //! \brief NCurveIntegral: integrate a curve file
 
+#ifndef REDUCE_CURV_H
+#define REDUCE_CURV_H
+
 #include "registry.hpp"
 
 //!  Function type: Evaluate curve functional
@@ -49,3 +52,5 @@ public:
     void display_entries() const;
     static void initialize();
 };
+
+#endif // REDUCE_CURV_H
diff --git a/pub/lib/reduce_spec.hpp b/pub/lib/reduce_spec.hpp
index 31fdf90e365e5e4a25cecc8c2cb166f8ebb669b3..eda55bb9c35ecf65971444a9fe20594b698bc14f 100644
--- a/pub/lib/reduce_spec.hpp
+++ b/pub/lib/reduce_spec.hpp
@@ -7,6 +7,9 @@
 //! \file  reduce_spec.hpp
 //! \brief Collection NGeni of generalized integral wrappers CGeni.
 
+#ifndef REDUCE_SPEC_H
+#define REDUCE_SPEC_H
+
 #include "registry.hpp"
 
 //!  Function type: Evaluate generalized integral for given vector(s).
@@ -44,3 +47,5 @@ public:
     void display_entries() const;
     static void initialize();
 };
+
+#endif // REDUCE_SPEC_H
diff --git a/pub/lib/rssm.hpp b/pub/lib/rssm.hpp
index fba21d189e36b8d97f7d6dd34b0c28273ab05210..2db43f8704dc623806fd8e1d73e8669b859037f5 100644
--- a/pub/lib/rssm.hpp
+++ b/pub/lib/rssm.hpp
@@ -7,6 +7,9 @@
 //! \file  rssm.hpp
 //! \brief NRSSM: directly read SPHERES raw data
 
+#ifndef RSSM_H
+#define RSSM_H
+
 //! Directly read SPHERES raw data.
 
 namespace NRSSM
@@ -15,3 +18,5 @@ void read_spec(int flag);
 void read_series(int flag);
 void read_series_to_histogram(int flag);
 }
+
+#endif // RSSM_H
diff --git a/pub/lib/slice.hpp b/pub/lib/slice.hpp
index 527eb889c7a830ced2c140796fe4012635773910..3f2fada86d569a5b692f2973cd237a541169e41a 100644
--- a/pub/lib/slice.hpp
+++ b/pub/lib/slice.hpp
@@ -7,6 +7,9 @@
 //! \file  slice.hpp
 //! \brief CSlice handles z dependent data, is base class for CSpec, CCurve.
 
+#ifndef SLICE_H
+#define SLICE_H
+
 
 //! Virtual base class for CSpec and CCurve. Holds z dependent data.
 
@@ -66,3 +69,5 @@ public:
     bool has_global_par() const;
     string info_line() const;
 };
+
+#endif // SLICE_H
diff --git a/pub/lib/special.hpp b/pub/lib/special.hpp
index 66bd960996d7c3c723ec674bc40e3b0ea7be0393..192da96e96e61e33c10b400f7ed7f1e9b12195c7 100644
--- a/pub/lib/special.hpp
+++ b/pub/lib/special.hpp
@@ -7,6 +7,9 @@
 //! \file  special.hpp
 //! \brief NSpecial: this and that, written ad hoc.
 
+#ifndef SPECIAL_H
+#define SPECIAL_H
+
 //  What falls out of use goes to ../../arch/one-time-routines/
 
 #include <complex>
@@ -32,3 +35,5 @@ template <typename T> complex<T> ff_test(T a, T b)
     return complex<T>(T(1.L) / b, T(0.L)) * (pssc(a + b) - pssc(a - b));
 }
 }
+
+#endif // SPECIAL_H
diff --git a/pub/lib/toplevel.hpp b/pub/lib/toplevel.hpp
index 1e2fffcd347adeef1652746367552ad07056241d..2e347a0b7a649bd056b674bbac6fdbcac198c782 100644
--- a/pub/lib/toplevel.hpp
+++ b/pub/lib/toplevel.hpp
@@ -7,6 +7,9 @@
 //! \file  toplevel.hpp
 //! \brief Execution context CFrida.
 
+#ifndef TOPLEVEL_H
+#define TOPLEVEL_H
+
 
 //! Execution context.
 
@@ -25,3 +28,5 @@ public:
     void execute_file(const std::string fname);
     void interactive();
 };
+
+#endif // TOPLEVEL_H
diff --git a/pub/lib/variables.hpp b/pub/lib/variables.hpp
index 4334ab42be6bc50717aa398b1ba89d6ee09fcfc5..96b3a7432c685674df89dc68aaa803660a9f36c1 100644
--- a/pub/lib/variables.hpp
+++ b/pub/lib/variables.hpp
@@ -7,8 +7,14 @@
 //! \file  variables.hpp
 //! \brief Declares class SVariRegistry.
 
+#ifndef VARIABLES_H
+#define VARIABLES_H
+
 #include "../trivia/singleton.hpp"
 
+#include "defs.hpp"
+#include "ptr.hpp"
+
 //! Registry for variable objects.
 
 class SVariRegistry : public triv::ISingleton<SVariRegistry>
@@ -25,3 +31,5 @@ public:
     void register_scalar(string key, PObj val);
     bool undef(string key);
 };
+
+#endif // VARIABLES_H
diff --git a/pub/lib/xax_lex.hpp b/pub/lib/xax_lex.hpp
index 30ef61e28525af1fc44b997e5972b8c19bb0a167..af3b7de36c92d3af48377fdf21f20513c45d4fcd 100644
--- a/pub/lib/xax_lex.hpp
+++ b/pub/lib/xax_lex.hpp
@@ -7,4 +7,9 @@
 //! \file  xax_lex.hpp
 //! \brief Declares user_xaxparse, the parser call implented in xax_lex.lpp.
 
+#ifndef XAX_LEX_H
+#define XAX_LEX_H
+
 RNode user_xaxparse(const char* lin);
+
+#endif // XAX_LEX_H