[Gmsh] gmsh 2.8.4 compilation errors under Visual Studio 10

Subhasis Sarkar ssarkar at tda-i.com
Sat May 24 04:21:59 CEST 2014


Hi,

 

I followed the instructions to create the Visual Studio10  solution file
using cmake. I was able to create the solution file but received a number of
errors while compiling as shown here

 

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

 

and more ......

 

The problem was fixed by making the following changes.

 

In Mesh\meshGFaceBDS.cpp(lines 775-776), replace 

 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);

 

and in

Mesh\meshGRegion.cpp(line 849), replace

   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/20140523/e593df6a/attachment.html>