[Proj] Build fails on Windows

Eric Miller EMiller at dfg.ca.gov
Thu Dec 22 17:22:05 EST 2011


Visual C++ (cl.exe) compiles both C and C++.  It has switches for forcing different behaviors as well as guessing by file extension (*.c vs. *.cpp).  But, Microsoft has basically said they aren't interested in implementing C99.  Some C99 features may make it into future versions of Visual C++ via the C++11 standard which Microsoft claims they plan to fully implement.
-- 

Eric G. Miller
Software Developer
CA Dept. of Fish & Game


>>> On 12/22/2011 at  1:10 PM, Michael Speth <spethm at landcareresearch.co.nz>
wrote:
> Hello,
>    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?
> 
> Regards
> 
> On 22/12/11 14:49, J. Luis wrote:
>> Hi,
>>
>> On Windows (VS2010) the build errors after the addition of the the
>> healpix projection
>>
>> Joaquim Luis
>>
>> PJ_healpix.c(149) : error C2057: expected constant expression
>> PJ_healpix.c(149) : error C2466: cannot allocate an array of constant size 0
>> PJ_healpix.c(149) : error C2087: 'vert' : missing subscript
>> PJ_healpix.c(222) : warning C4048: different array subscripts : 'double
>> (*)[1]' and 'double [18][18]'
>> PJ_healpix.c(238) : warning C4048: different array subscripts : 'double
>> (*)[1]' and 'double [12][12]'
>> PJ_healpix.c(572) : error C2143: syntax error : missing ';' before 'type'
>> PJ_healpix.c(573) : error C2143: syntax error : missing ';' before 'type'
>> PJ_healpix.c(575) : error C2065: 'x' : undeclared identifier
>> PJ_healpix.c(575) : error C2065: 'y' : undeclared identifier
>> PJ_healpix.c(588) : error C2061: syntax error : identifier
>> 's_healpix_inverse'
>> PJ_healpix.c(588) : error C2059: syntax error : ';'
>> PJ_healpix.c(588) : error C2059: syntax error : 'type'
>> PJ_healpix.c(652) : error C2065: 's_healpix_inverse' : undeclared identifier
>>
>> I also get this warnings that are independent of the above problem
>>
>> pj_open_lib.c(46) : warning C4129: 'p' : unrecognized character escape
>> sequence
>> pj_open_lib.c(46) : warning C4129: 'c' : unrecognized character escape
>> sequence
>> pj_open_lib.c(46) : warning C4129: 'p' : unrecognized character escape
>> sequence
>> pj_open_lib.c(46) : warning C4129: 'c' : unrecognized character escape
>> sequence
>> pj_open_lib.c(46) : warning C4129: 'V' : unrecognized character escape
>> sequence
>> pj_open_lib.c(46) : warning C4129: 'S' : unrecognized character escape
>> sequence
>> _______________________________________________
>> Proj mailing list
>> Proj at lists.maptools.org 
>> http://lists.maptools.org/mailman/listinfo/proj 
> 




More information about the Proj mailing list