[postgis-users] Error compiling geos 2.1.0 on Windows/MinGW

TECHER Jean David davidtecher at yahoo.fr
Mon Nov 29 03:08:46 PST 2004


Seems MinGW doens't have function gettimeofday

Any suggestion??
----------------------------------------------------------------
TECHER Jean David
Responsable Informatique 01MAP
e-mail: davidtecher at yahoo.fr
site perso : http://techer.pascal.free.fr/postgis/
site pro: http://www.01map.com/download/
K-S:"The greatest trick the devil pulled off was convincing people he didn't exist"
------------------------------------------------------------
  ----- Original Message ----- 
  From: TECHER Jean David 
  To: PostGIS Users Discussion 
  Sent: Monday, November 29, 2004 11:10 AM
  Subject: [postgis-users] Error compiling geos 2.1.0 on Windows/MinGW


  Hi 

  I tried to compil geos 2.1.0 on Windows XP using MinGW

  I got this error 


  g++ -DHAVE_CONFIG_H -I. -I. -I../../source/headers -I../../source/headers/geos -I../../source/headers -DGEOS_VERSION=2.1.0 -g -O2 -MT Profiler.lo -MD -MP -MF .deps/Profiler.Tpo -c ../util/Profiler.cpp  -DDLL_EXPORT -DPIC -o .libs/Profiler.o
  ../util/Profiler.cpp: In member function `void geos::Profile::start()':
  ../util/Profiler.cpp:36: `gettimeofday' undeclared (first use this function)
  ../util/Profiler.cpp:36: (Each undeclared identifier is reported only once for 
     each function it appears in.)
  make[2]: *** [Profiler.lo] Error 1
  make[2]: Leaving directory `/home/src-2004-11-26/geos-2.1.0/source/geom'
  make[1]: *** [all-recursive] Error 1
  make[1]: Leaving directory `/home/src-2004-11-26/geos-2.1.0/source'
  make: *** [all-recursive] Error 1

  As I'm not a great C++ programer I saw that gettimeofday'  is not in my sources from MinGW

  On the Web , I found this code but not sure for his need 

  typedef struct _FILETIME {
          unsigned long dwLowDateTime;
          unsigned long dwHighDateTime;
     } FILETIME;
     void __stdcall GetSystemTimeAsFileTime(FILETIME*);
     
     void gettimeofday(struct timeval* p, void* tz /* IGNORED */);

     void gettimeofday(struct timeval* p, void* tz /* IGNORED */){
       union {
         long long ns100; /*time since 1 Jan 1601 in 100ns units */
         FILETIME ft;
       } _now;

       GetSystemTimeAsFileTime( &(_now.ft) );
       p->tv_usec=(long)((_now.ns100 / 10LL) % 1000000LL );
       p->tv_sec= (long)((_now.ns100-(116444736000000000LL))/10000000LL);
       return;
     }

  Putting it on Profiler.cpp work but make stopped for XMLTester.exe

  Any Ideas???
  ----------------------------------------------------------------
  TECHER Jean David
  Responsable Informatique 01MAP
  e-mail: davidtecher at yahoo.fr
  site perso : http://techer.pascal.free.fr/postgis/
  site pro: http://www.01map.com/download/
  K-S:"The greatest trick the devil pulled off was convincing people he didn't exist"
  ------------------------------------------------------------




   


------------------------------------------------------------------------------


  _______________________________________________
  postgis-users mailing list
  postgis-users at postgis.refractions.net
  http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20041129/02ba5742/attachment.html>


More information about the postgis-users mailing list