Opened 8 years ago
Closed 8 years ago
#6390 closed defect (fixed)
previous redeclaration of int sprintf under Mingw64
Reported by: | robe | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 2.1.0 |
Component: | default | Version: | svn-trunk |
Severity: | normal | Keywords: | |
Cc: |
Description
Can't compile trunk under Mingw64
make[1]: Entering directory `/projects/gdal/branches/2.1/gdal/port' /bin/sh /projects/gdal/branches/2.1/gdal/libtool --mode=compile --tag=CXX x86_64-w64-mingw32-g++ -I/projects/gdal/branches/2.1/gdal/port -I/projects/gdal/branches/2.1/gdal/gcore -I/projects/gdal/branches/2.1/gdal/alg -I/projects/gdal/bran -I../frmt libtool: compile: x86_64-w64-mingw32-g++ -I/projects/gdal/branches/2.1/gdal/port -I/projects/gdal/branches/2.1/gdal/gcore -I/projects/gdal/branches/2.1/gdal/alg -I/projects/gdal/branches/2.1/gdal/ogr -I/projects/gdal/branches/2.1/gdal/ogr/ogrsf_frmt In file included from cpl_port.h:128:0, from cpl_conv.h:35, from cpl_conv.cpp:43: c:/ming64gcc48/mingw64/x86_64-w64-mingw32/include/stdio.h:307:5: error: previous declaration of 'int sprintf(char*, const char*, ...)' with 'C++' linkage int sprintf (char *__stream, const char *__format, ...) ^ In file included from cpl_conv.h:35:0, from cpl_conv.cpp:43: cpl_port.h:828:85: error: conflicts with new declaration with 'C' linkage #define CPL_WARN_DEPRECATED(x) __attribute__ ((deprecated)) ^ cpl_port.h:847:74: note: in expansion of macro 'CPL_WARN_DEPRECATED' int sprintf(char *str, const char* fmt, ...) CPL_PRINT_FUNC_FORMAT(2, 3) CPL_WARN_DEPRECATED("Use snprintf() or CPLsnprintf() instead"); ^ ../GDALmake.opt:661: recipe for target `cpl_conv.lo' failed make[1]: *** [cpl_conv.lo] Error 1 make[1]: Leaving directory `/projects/gdal/branches/2.1/gdal/port' GNUmakefile:71: recipe for target `port-target' failed make: *** [port-target] Error 2 make: *** No rule to make target `check'. Stop.
I was able to about a month ago. I'll double-check 2.0 to see if have same issue
Note:
See TracTickets
for help on using tickets.
trunk r33609 "Fix build with x86_64-w64-mingw32 4.8 (#6390)"