[Gmsh] Issue with compilation of Gmsh 2.7 in Visual Studio 2010

Nigel Nunn nnnunnn at gmail.com
Mon May 20 22:28:49 CEST 2013


Visual Studio 2010 needed the following changes to build svn gmsh.
Can gmsh team use this, or should I send report to bug place?
Nigel.


*** Common/GamePad.cpp (line 179) ***

    int bin = pow(2.0, i); // ambiguous

*** contrib/Chaco/util/smalloc.c  (line 294) ***

  //bytes_used =- dbptr->size;
		bytes_used -= dbptr->size;  // ??

*** contrib/HighOrderMeshOptimizer/OptHomRun.cpp ***

#include <iterator>


*** contrib/onelab/OnelabClients.cpp ***

#include <iso646.h>  // {not=!} {and=&&} etc.


*** Fltk/Navigator.cpp ***

#if !defined(WIN32) || defined(__CYGWIN__) // NBN:
#include <unistd.h>
#endif


*** Geo/GModel.cpp (line 3212) ***

  // multimap <- map
//for(std::     map<dpair, tpair>::iterator it = _homologyRequests.begin();
  for(std::multimap<dpair, tpair>::iterator it = _homologyRequests.begin();


*** Geo/gmshLevelset.cpp (line 944) ***

  // C array of int
#if (0)
  ANNidx _index[_nbClose];
  ANNdist _dist[_nbClose];
#else  // NBN: compiler
  ANNidx* _index = (ANNidx*) calloc(_nbClose, sizeof(ANNidx));
  ANNdist* _dist = (ANNdist*) calloc(_nbClose, sizeof(ANNdist));
#endif


*** Mesh/CenterlineField.cpp (lines 1083 and 1094) ***

  // make C array length const
  const int num_neighbours = 1;
  ANNidx index[num_neighbours];
  ANNdist dist[num_neighbours];


*** Mesh/directions3D.cpp (line 1048) ***

  // declate template traits (Less_Edge)
  for(std::map<MEdge, double, Less_Edge>::iterator it = crossDist.begin();


*** Mesh/directions3D.cpp (line 1122) ***

  // declate template traits (Less_Edge)
  std::map<MEdge, double, Less_Edge>::iterator it =
crossDist.find(pTet->getEdge(k));


*** Mesh/QuadTriExtruded2D.cpp (line 446) ***

  // may need extra parentheses
//if( !ep || !ep->mesh.ExtrudeMesh || ! ep->geo.Mode == COPIED_ENTITY )
  if( !ep || !ep->mesh.ExtrudeMesh || !(ep->geo.Mode == COPIED_ENTITY)) // ??


*** Mesh/yamakawa.cpp ***

#include <iterator> // NBN:


*** Plugin/HomologyPostProcessing.cpp (lines 110 and 122) ***

  // ambiguous: cast to double
  int n = sqrt((double)matrix.size()); // NBN: ambiguous

---------- end ----------