Opened 8 years ago
Closed 5 years ago
#762 closed defect (wontfix)
Compiling error on cygwin
Reported by: | jingsam | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 3.5.3 |
Component: | Default | Version: | 3.5.0 |
Severity: | Unassigned | Keywords: | |
Cc: |
Description
When I tried to compile geos on cygwin, errors occur:
geos_ts_c.cpp: in fucntion ‘void GEOSContextHandle_HS::NOTICE_MESSAGE(std::string, ...)’: geos_ts_c.cpp:228:81: error:‘vsnprintf’ undeclared in the context
int result = vsnprintf(msgBuffer, sizeof(msgBuffer) - 1, fmt.c_str(), args);
geos_ts_c.cpp: in function ‘void GEOSContextHandle_HS::ERROR_MESSAGE(std::string, ...)’中: geos_ts_c.cpp:249:81: error:‘vsnprintf’ undeclared in the context
int result = vsnprintf(msgBuffer, sizeof(msgBuffer) - 1, fmt.c_str(), args);
That may be caused by the non-existence of vsnprintf() which is a c++11 function.
g++ version: 4.9.3
Change History (5)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
I got it. I checked the compiling command as fellows:
g++ -DHAVE_CONFIG_H -I. -I../include -I../include/geos -I../include -DGEOS_CAPI_VERSION=\"3.5.0-CAPI-1.9.0\" -DGEOS_JTS_PORT=\"1.13.0\" -DGEOS_INLINE -pedantic -Wall -ansi -Wno-long-long -ffloat-store -g -O2 -MT libgeos_c_la-geos_ts_c.lo -MD -MP -MF .deps/libgeos_c_la-geos_ts_c.Tpo -c geos_ts_c.cpp -DDLL_EXPORT -DPIC -o .libs/libgeos_c_la-geos_ts_c.o
The tag "-ansi" is equivalent to "-std=c++98". The function "vsnprintf()" is not implemented in ansi standard. I think GEOS should adjust the compiling command.
comment:4 by , 6 years ago
Milestone: | 3.5.2 → 3.5.3 |
---|
comment:5 by , 5 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Ancient version on ancient platform. Revive with a patch, it won't be worked on by the community.
According to the man page: