Thank you very much Vasilis and much appreciated!
Okay so the problem for random.h
was in the following definition for CYGWIN
inside the random header file:
#ifdef __ANDROID_API__
// Apparently android has drand48 but not the re-entrant version
#define HAS_RAND48
// #define BASIC_RAND
// #elif defined(__MACH__) || defined(CYGWIN) || defined(ANDROID)
#elif defined(__MACH__) || defined(__CYGWIN__) || defined(ANDROID)
#define HAS_RAND48
#endif
According to the following topic (and the cited list inside the topic), it should be __CYGWIN__
with two underscores preceding and following the keyword CYGWIN
. This will make the logics related to HAS_RAND48
work as intended.
Also, for the sincos
method, you can find it defined as such inside bmath.h
:
#if defined(__APPLE__) || defined(ANDROID) || defined(__ANDROID_API__) || defined(CYGWIN)
inline void sincos(const double x, double* ss, double* cc) { *ss = sin(x); *cc = cos(x);}
and yes indeed another CYGWIN
to __CYGWIN__
.
Now all errors are resolved when I re-compile again (after make clean
) with the following options:
make CXXFLAGS="-D_GNU_SOURCE"
or make CXXFLAGS="-D_USE_MATH_DEFINES"
but a new one appears! The following error:
In file included from ../data/meshdata.h:11,
from geometry.h:150,
from gregion.cc:14:
gregion.cc: In member function ‘unsigned int GRegion::boundaryCrossings(const Point&, const Point&, double*, Cache<CBody3D>&) const’:
gregion.cc:794:24: error: ‘body’ was not declared in this scope
794 | assert(body != nullptr); // we should always exit
| ^~~~
which refers to the following location inside gregion.cc
file:
// find distance to exit
DEBUG(GBody* body =)
zone->distance2Out(pos,dir, &tmin,tmax, cache);
assert(body != nullptr); // we should always exit
but I changed it to:
GBody* body = zone->distance2Out(pos, dir, &tmin, tmax, cache);
And then after cleaning and re-compiling, this at last compiled, please see the following screen output. Please also advise if this DEBUG
line was intended as it was.
screen_output_compilation.txt (26.2 KB)
With that done, I currently have the geoviwer.dll
file and the usrbin2dvh.exe
, meshtk.exe
executables generated. I still have issue running flair-geoviwer
, however! Although I did make install
and the previous files are copied to flair install location (/usr/local/flair
), but flair does not yet identify flair-geoviwer
:
It seems of course we are already there and it is a matter of flair recognizing flair-geoviewer (although it is in the PATH
), so any further instructions please?