[Gmsh] Gmsh 2.8.4 compilation error in Visual Studio 2010

Subhasis Sarkar ssarkar at tda-i.com
Thu May 22 05:35:00 CEST 2014


Hello All,

 

I get the following errors while compiling Gmsh 2.8.4 in Visual Studio 2010.

 

2>------ Build started: Project: gmsh, Configuration: RelWithDebInfo Win32
------

2>  meshGFaceBDS.cpp

2>..\Mesh\meshGFaceBDS.cpp(774): error C2440: 'initializing' : cannot
convert from 'std::_Tree_iterator<_Mytree>' to
'std::_Tree_iterator<_Mytree>'

2>          with

2>          [

2>              _Mytree=std::_Tree_val<std::_Tmap_traits<BDS_Point *,MVertex
*,PointLessThan,std::allocator<std::pair<BDS_Point *const ,MVertex
*>>,false>>

2>          ]

2>          and

2>          [

2>              _Mytree=std::_Tree_val<std::_Tmap_traits<BDS_Point *,MVertex
*,std::less<BDS_Point *>,std::allocator<std::pair<BDS_Point *const ,MVertex
*>>,false>>

2>          ]

2>          No constructor could take the source type, or constructor
overload resolution was ambiguous

 

....... more errors like above.........

 

The errors can be fixed by making the following changes.

 

replace  mesh\meshGFaceBDS.cpp(lines 775-776)

             std::map<BDS_Point*, MVertex*>::iterator itp1 =
recoverMap->find(e->p1);

             std::map<BDS_Point*, MVertex*>::iterator itp2 =
recoverMap->find(e->p2);

by

             std::map<BDS_Point*, MVertex*, PointLessThan>::iterator itp1 =
recoverMap->find(e->p1);

             std::map<BDS_Point*, MVertex*, PointLessThan>::iterator itp2 =
recoverMap->find(e->p2);

 

replace  mesh\meshGRegion.cpp(line 849)

             std::set<MEdge>::iterator ite =  edges.begin();

by

              std::set<MEdge, Less_Edge>::iterator ite =  edges.begin();

 

Thanks,

Subhasis

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20140521/fd72a924/attachment.html>