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

strk at refractions.net strk at refractions.net
Mon Nov 29 03:15:54 PST 2004


On Mon, Nov 29, 2004 at 11:10:20AM +0100, TECHER Jean David wrote:
> 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

It's a C function actually. Have you looked for it's definition in C
includes ? Profiler.h includes sys/times.h but maybe you have it somewhere
else... Let me know.
--strk;

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




More information about the postgis-users mailing list