[mapserver-dev] Mixed code and variable definition breaks MSVC builds
szekerest at gmail.com
Sat Jul 21 14:41:20 PDT 2012
I usually find issues in the mapserver codebase due to the mixed code and
variable definitions committed into the code according to the C++/C99 style
coding convention. This makes the code uncompilable with MSVC which is
still pretty much C89 with a few minor extensions, and it doesn't support
this practice by default. We could definitely rename the corresponding c
files to cpp or force the c++ compilation or we can use a commandine option
to provide the same effect if we would like to follow this convention.
In the past I continouosly fixed this issue by modifying the corresponding
code to use C89 forward definitions, but I'm not sure I'd like to take the
responsibility do such things in a daily practice. At the moment we also
have such issues in mapserver/master breaking the Windows builds for
What would be the reasonable solution to prevent this issue happening so
frequently? We should probably make a decision whether we should compile
MapServer with MSVC for C++ or declare we might want to use forward
definitions everywhere in the code (Probably MS RFC 7.1 should be modified
BTW: gcc users may sometimes take a look at the daily builds at
http://www.gisinternals.com/sdk/ to make sure thinks are working correctly
with MSVC or not.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mapserver-dev