[Proj] Build fails on Windows

Mateusz Łoskot mateusz at loskot.net
Thu Dec 22 13:50:40 PST 2011


On 22 December 2011 21:10, Michael Speth <spethm at landcareresearch.co.nz> wrote:
>   Why is proj.4 being compiled with a C++ compiler?  Variable length
> arrays are valid C language constructs but are not in C++.  So does
> proj.4 need to be both C and C++ compiler compliant?

This has nothing to do with compiling as C++.
AFAIU, PROJ.4 is supposed to build with Visual C++.
Visual C++ does support C but only C89, not C99.

But, due to the fact that C++03 standard includes C89,
while using Visual C++, you can compile C sources as C++
without problems, as long as C source is C89.
C99 source code will not compile regardless of C or C++ mode,
because Visual C++ does not implement C99 standard.

Some of features of C99 are included in most recent C++11 standard, but not VLA

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org



More information about the Proj mailing list