Hi Nicolas,

I just made the modification in order to build with MSVC 2005. It should be in the nightly version of tonight ? tomorrow morning.
However, you can replace the fmax with std::max, fminf with std::min and add include <time.h> in the beginning of the file SOrientedBoundingBox.cpp.

You should also have some problems in OCC_Connect.{h, cpp}, GeomMeshMatcher,
replace


struct LessThanIntegerSet {
        bool operator()(std::set<int> const &a, std::set<int> const &b) ;
    };

by this

struct LessThanIntegerSet {
        bool operator()(std::set<int> const &a, std::set<int> const &b) const;
    };



and
bool OCC_Connect::LessThanIntegerSet::operator()(std::set<int> const &a,
    std::set<int> const &b)
{
    std::set<int>::iterator pa=a.begin(), pb=b.begin();
    for(; pa!=a.end() && pb!=b.end(); pa++, pb++ ) {
         if(*pa<*pb)
             return 1;
         if(*pb<*pa)
             return 0;
    }
    if(pb!=b.end())
        return 1;
    return 0;
}

by

bool OCC_Connect::LessThanIntegerSet::operator()(std::set<int> const &a,
    std::set<int> const &b) const
{
    std::set<int>::const_iterator pa=a.begin(), pb=b.begin();
    for(; pa!=a.end() && pb!=b.end(); pa++, pb++ ) {
         if(*pa<*pb)
             return 1;
         if(*pb<*pa)
             return 0;
    }
    if(pb!=b.end())
        return 1;
    return 0;
}

and SaveBRep should return 1.


Cheers
Laurent


Le 16:51 18/06/2009,[email protected] écrit:
Hi!

I've been trying to build Gmsh on Windows with OpenCASCADE support, 
and I'm runnig into a few problems:

  Here is the configuration I used :

ENABLE_GUI=0
ENABLE_BLAS_LAPACK=0
ENABLE_PARSER=1
ENABLE_POSTPRO=1
ENABLE_TETGEN=0
ENABLE_NETGEN=0
ENABLE_METIS=0
ENABLE_OCC=1
ENABLE_MED=0


I used Visual C++ express 2008 on Windows XP Pro 64bits, with a 
default install of OpenCascade 6.3.0 and the nightly package sources 
20090615.

- in the topmost Makefile:
   GMSH_EXTRA_VERSION = "-cvs-20090615"
   The double quotes seams to be the origin of an error when 
generating GmshVersion.h, as the resulting version number was :
"2.3.1"-cvs-20090615""
  Removing them in the Makefile allowed me to go further.


- in variables.msvc, the relative path for OCC libs did not match the 
one of the OCC installation (I used a default OCC installation):
ifeq (${ENABLE_OCC},1)
   FLAGS+=/DHAVE_OCC /DHAVE_NO_OCC_CONFIG_H /DWNT /I${OCC_PREFIX}/inc
   GMSH_LIBS+=${OCC_PREFIX}/win32/bin/*.lib
endif

I modified the corresponding line to:
   GMSH_LIBS+=${OCC_PREFIX}/win32/lib/*.lib


- and in the 20090618 version of the nightly sources :

gmake.exe[1]: Entering directory `C:/Gmsh_stuff/gmsh-2.3.1-cvs-20090618/Geo'
cl /EHsc /nologo /GR /MT /O2 /DWIN32 /D_USE_MATH_DEFINES /DNOMINMAX 
/D_CRT_SECURE_NO_DEPRECATE /DHAVE_NO_DLL /DHAVE_ANN /DHAVE_MATH_EVAL 
/I../Common /I../Geo /I../Mesh /I../Post /I../Numeric /I../Parser 
/I../contrib/ANN/include /I../contrib/kbipack /I../contrib/MathEval 
/I../contrib/gmm /I"C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include;" 
/c SOrientedBoundingBox.cpp
SOrientedBoundingBox.cpp
SOrientedBoundingBox.cpp(164) : error C3861: 'fmaxf': identifier not found
SOrientedBoundingBox.cpp(164) : error C3861: 'fmaxf': identifier not found
SOrientedBoundingBox.cpp(292) : error C3861: 'fmaxf': identifier not found
SOrientedBoundingBox.cpp(293) : error C3861: 'fminf': identifier not found
SOrientedBoundingBox.cpp(343) : error C3861: 'time': identifier not found
SOrientedBoundingBox.cpp(469) : error C3861: 'fminf': identifier not found
SOrientedBoundingBox.cpp(470) : error C3861: 'fmaxf': identifier not found



In the meantime, I switched to a Linux plateform, where I also had a 
few problems, i'll put it in an other thread.
Hope this can be of use to you.


Best Regards,
Nicolas SAUGNIER

_______________________________________________
gmsh mailing list
[email protected]
http://www.geuz.org/mailman/listinfo/gmsh

__________________________________________________________________________________________________

Laurent Van Miegroet
Ingénieur de recherche
LTAS - Service d'Ingénierie des Véhicules Terrestres
Université de Liège
Institut de Mécanique et de Génie Civil, Bât. B52
Chemin des Chevreuils, 1
B-4000 Liège, Belgique
Tél : +32.4.366.92.70
Fax: +32.4.366.91.59
E-Mail : [email protected]
URL: www.ingveh.ulg.ac.be
SHELLECO : www.shelleco.ulg.ac.be


_______________________________________________
gmsh mailing list
[email protected]
http://www.geuz.org/mailman/listinfo/gmsh

Reply via email to