diff --git a/Geo/GFaceCompound.h b/Geo/GFaceCompound.h
index e086c40a659b5e06f24929b1a5740f357e7d6d56..f97a9fb072cbf42c198481a9e81c8b451c2d5609 100644
--- a/Geo/GFaceCompound.h
+++ b/Geo/GFaceCompound.h
@@ -230,6 +230,7 @@ class GFaceCompound : public GFace {
   GPoint intersectionWithCircle (const SVector3 &n1, const SVector3 &n2, const SVector3 &p,
 				 const double &d, double uv[2]) const { return GPoint(); }
   int allowPartition() const{ return 1; }
+  void deleteInternals(){}
 };
 
 #endif
diff --git a/Mesh/Field.h b/Mesh/Field.h
index 7914f3c8cd8fe02c24585bb16c560a3dce3248d1..79108e57d2529da3de9b982583a2883871dfe914 100644
--- a/Mesh/Field.h
+++ b/Mesh/Field.h
@@ -165,7 +165,38 @@ class BoundaryLayerField : public Field {
   void setupFor3d();
   void removeAttractors();
 };
+#else
+class BoundaryLayerField : public Field {
+ public:
+  double hwall_n,hwall_t,ratio,hfar,thickness,fan_angle; 
+  double current_distance, tgt_aniso_ratio;
+  SPoint3 _closest_point;
+  int iRecombine, iIntersect;
+  //AttractorField *current_closest;
+  virtual bool isotropic () const {return false;}
+  virtual const char *getName(){return "";}
+  virtual std::string getDescription(){return "";}
+  BoundaryLayerField() : hwall_n(0.), hwall_t(0.), ratio(0.),
+	                 hfar(0.), thickness(0.), fan_angle(0.),
+			 current_distance(0.), tgt_aniso_ratio(0.),
+			 _closest_point(0.,0.,0.), iRecombine(0), iIntersect(0)
+                         //current_closest(NULL)
+  {
+    Msg::Error("You must compile with ANN to use BoundaryLayerField");
+  }
+  ~BoundaryLayerField() {}
+  virtual double operator() (double x, double y, double z, GEntity *ge=0){return 0.;}
+  virtual void operator() (double x, double y, double z, SMetric3 &metr, GEntity *ge=0){}
+  bool isFaceBL (int iF) const {return false;}
+  bool isEdgeBL (int iE) const {return false;}
+  bool isVertexBL (int iV) const {return false;}
+  void computeFor1dMesh(double x, double y, double z, SMetric3 &metr){return;}
+  void setupFor2d(int iF){return;}
+  void setupFor3d(){return;}
+  void removeAttractors(){return;}
+};
 #endif
+
 class FieldOptionString : public FieldOption
 {
  public:
diff --git a/Mesh/meshGRegion.cpp b/Mesh/meshGRegion.cpp
index 09c4e28d9cb3ab5d98a905ce22e9e0d69702c4a1..7b6aa0e4862acf2040a10c2dba5ae70be2cfc289 100644
--- a/Mesh/meshGRegion.cpp
+++ b/Mesh/meshGRegion.cpp
@@ -1066,6 +1066,7 @@ void _relocateVertex(MVertex *ver,
   }
 }
 
+#if defined(HAVE_TETGEN)
 bool CreateAnEmptyVolumeMesh(GRegion *gr){
   printf("creating an empty volume mesh\n");
   splitQuadRecovery sqr;
@@ -1088,7 +1089,12 @@ bool CreateAnEmptyVolumeMesh(GRegion *gr){
   TransferTetgenMesh(gr, in, out, numberedV);
   return true;
 }
-
+#else
+bool CreateAnEmptyVolumeMesh(GRegion *gr){
+  Msg::Error("You should compile with TETGEN in order to create an empty volume mesh");
+  return false;
+}
+#endif // HAVE_TETGEN#endif // HAVE_TETGEN#endif // HAVE_TETGEN
 
 void MeshDelaunayVolume(std::vector<GRegion*> &regions)
 {