From 52ce65fddd1666e5c45ec13210a129d60c9648a6 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 10 Dec 2007 07:19:44 +0000
Subject: [PATCH] compile fixes for debian

---
 Geo/MElement.h              | 2 +-
 contrib/ANN/src/kd_dump.cpp | 1 +
 doc/README.occ              | 4 ++++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Geo/MElement.h b/Geo/MElement.h
index a514effaf6..f5d3fcbce7 100644
--- a/Geo/MElement.h
+++ b/Geo/MElement.h
@@ -437,7 +437,7 @@ class MTriangle6 : public MTriangle {
     tmp = _v[1]; _v[1] = _v[2]; _v[2] = tmp;
     tmp = _vs[0]; _vs[0] = _vs[2]; _vs[2] = tmp;
   }
-  virtual void jac ( double u, double v , double j[2][2]) ;
+  virtual void jac(double u, double v, double j[2][2]);
 };
 
 class MTriangleN : public MTriangle {
diff --git a/contrib/ANN/src/kd_dump.cpp b/contrib/ANN/src/kd_dump.cpp
index de6260c7d3..361e63912c 100644
--- a/contrib/ANN/src/kd_dump.cpp
+++ b/contrib/ANN/src/kd_dump.cpp
@@ -33,6 +33,7 @@
 
 #include "kd_tree.h"					// kd-tree declarations
 #include "bd_tree.h"					// bd-tree declarations
+#include <string.h> // for gmsh
 #include <stdlib.h> // for gmsh
 
 using namespace std;					// make std:: available
diff --git a/doc/README.occ b/doc/README.occ
index dbbf8dfc46..b0248540ec 100644
--- a/doc/README.occ
+++ b/doc/README.occ
@@ -8,6 +8,10 @@ How to build OpenCascade 6.2 for Gmsh:
   export CC="gcc -mno-cygwin -DWNT=1 -DWIN32 -DHAVE_NO_DLL"
   export CXX="g++ -mno-cygwin -DWNT=1 -DWIN32 -DHAVE_NO_DLL"
 
+- with new versions of gcc, add "-ffriend-injection" to the compiler
+  options (this prevents the "Standard_Transient_Type_ not declared"
+  error)
+
 - go to the ros/ directory and type
 
   ./configure --prefix=/usr/local/opencascade --enable-debug=no 
-- 
GitLab