maporaclespatial.c not building on win32
Fernando,
maporaclespatial.c isn't building on Windows. It seems you are declaring
variables after the first line of non-declarative code in some functions.
This is not legal in C (though it is in C++) even though GCC permits it.
However, it seems that MS VisualC++ does not so it will need to be corrected.
I imagine you can reproduce similar errors by using the GCC -pedantic or -ansi
flags. Some level of warning should show illegal C-isms.
Howard Butler did the build that ran into the problems. I'll ask him to
add himself as a cc: so he will see when you have fixed it and he can try again
on windows.
Errors look like this:
mapgml.c
cl /MD /nologo /Zi /W3 -DWIN32 -D_WIN32 -Id:\cvs\gd-2.0.26gif
-ID:\cvs\proj/src -ID:\cvs\php\php-4.3.7/regex -DPHP_NO_ALIASES
-ID:\cvs\gdal\gdal/gcore -ID:\cvs\gdal\gdal/alg -ID:\cvs\gdal\gdal/ogr
-ID:\cvs\gdal\gdal/port -ID:\cvs\gdal\gdal/ogr/ogrsf_frmts
-ID:\cvs\gdal\gdal/ogr -ID:\cvs\gdal\gdal/port -ID:\cvs\curl/include
-ID:\cvs\ming/src -ID:\cvs\ming -ID:\cvs\ming/actioncompiler -ID:\cvs\pdflib/
-ID:\cvs\gdal\postgis\postgresql-7.4/interfaces/libpq
-ID:\cvs\gdal\postgis\postgresql-7.4/src/include
-ID:\Oracle\ora92/oci/include -Ic:/arcgis/arcsde/include
-ID:\cvs\iconv\libiconv-1.9.1\include -DNEED_STRCASECMP -DNEED_STRNCASECMP
-DNEED_STRCASECMP -DNEED_STRNCASECMP -DUSE_POSTGIS -DUSE_PROJ -DUSE_PROJ_API_H
-DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_GIF -DGD_HAS_GDIMAGEGIFPTR -DUSE_GD_FT
-DUSE_OGR -DUSE_WMS_SVR -DUSE_WMS_LYR -DUSE_WMS_SVR -DUSE_MING_FLASH
-DIGNORE_MISSING_DATA -DNEED_NONBLOCKING_STDERR -DUSE_GDAL -DUSE_SDE -DWIN32
-DFEATURE_INFO_HTML -DUSE_WCS_SVR -DNEED_STRLCAT -DUSE_MAPIO -DHAVE_LIBJPEG
-DUSE_WFS_SVR -DUSE_WFS_LYR -DUSE_PDF -DUSE_GD_ANTIALIAS -DUSE_ORACLESPATIAL
-DMING_VERSION_03 -DUSE_ICONV -DUSE_WCS_SVR /c maporaclespatial.c
/Fomaporaclespatial.obj
maporaclespatial.c
maporaclespatial.c(923) : error C2275: 'msOracleSpatialLayerInfo' : illegal use
of this type as an expression
maporaclespatial.c(197) : see declaration of 'msOracleSpatialLayerInfo'
maporaclespatial.c(923) : error C2065: 'layerinfo' : undeclared identifier
maporaclespatial.c(924) : error C2275: 'msOracleSpatialHandler' : illegal use of
this type as an expression
maporaclespatial.c(175) : see declaration of 'msOracleSpatialHandler'
maporaclespatial.c(924) : error C2065: 'hand' : undeclared identifier
maporaclespatial.c(924) : error C2223: left of '->orahandlers' must point to
struct/union
maporaclespatial.c(926) : warning C4047: '==' : 'int ' differs in levels of
indirection from 'void *'
maporaclespatial.c(954) : error C2223: left of '->items' must point to struct/union
maporaclespatial.c(955) : error C2223: left of '->items' must point to struct/union
maporaclespatial.c(1023) : warning C4047: 'function' : 'struct
msOracleSpatialHandler *' differs in levels of indirection from 'int '
maporaclespatial.c(1023) : warning C4024: 'TRY' : different types for formal and
actual parameter 1
maporaclespatial.c(1023) : error C2223: left of '->stmthp' must point to
struct/union
maporaclespatial.c(1023) : error C2223: left of '->errhp' must point to struct/union
maporaclespatial.c(1028) : warning C4047: 'function' : 'struct
msOracleSpatialHandler *' differs in levels of indirection from 'int '
maporaclespatial.c(1028) : warning C4024: 'TRY' : different types for formal and
actual parameter 1
maporaclespatial.c(1028) : error C2223: left of '->stmthp' must point to
struct/union
maporaclespatial.c(1028) : error C2223: left of '->errhp' must point to struct/union
maporaclespatial.c(1028) : error C2223: left of '->items' must point to struct/union
maporaclespatial.c(1033) : warning C4047: 'function' : 'struct
msOracleSpatialHandler *' differs in levels of indirection from 'int '
maporaclespatial.c(1033) : warning C4024: 'TRY' : different types for formal and
actual parameter 1
maporaclespatial.c(1035) : error C2223: left of '->stmthp' must point to
struct/union
maporaclespatial.c(1035) : error C2223: left of '->errhp' must point to struct/union
maporaclespatial.c(1036) : warning C4047: 'function' : 'struct
msOracleSpatialHandler *' differs in levels of indirection from 'int '
maporaclespatial.c(1036) : warning C4024: 'TRY' : different types for formal and
actual parameter 1
maporaclespatial.c(1038) : error C2223: left of '->errhp' must point to struct/union
maporaclespatial.c(1038) : error C2223: left of '->tdo' must point to struct/union
maporaclespatial.c(1038) : error C2223: left of '->obj' must point to struct/union
maporaclespatial.c(1038) : error C2223: left of '->ind' must point to struct/union
maporaclespatial.c(1039) : warning C4047: 'function' : 'struct
msOracleSpatialHandler *' differs in levels of indirection from 'int '
maporaclespatial.c(1039) : warning C4024: 'TRY' : different types for formal and
actual parameter 1
maporaclespatial.c(1041) : error C2223: left of '->svchp' must point to struct/union
maporaclespatial.c(1041) : error C2223: left of '->stmthp' must point to
struct/union
maporaclespatial.c(1041) : error C2223: left of '->errhp' must point to struct/union
maporaclespatial.c(1042) : warning C4047: 'function' : 'struct
msOracleSpatialHandler *' differs in levels of indirection from 'int '
maporaclespatial.c(1042) : warning C4024: 'TRY' : different types for formal and
actual parameter 1
maporaclespatial.c(1044) : error C2223: left of '->stmthp' must point to
struct/union
maporaclespatial.c(1044) : error C2223: left of '->rows_fetched' must point to
struct/union
maporaclespatial.c(1044) : error C2223: left of '->errhp' must point to struct/union
maporaclespatial.c(1057) : error C2223: left of '->row_num' must point to
struct/union
maporaclespatial.c(1057) : error C2223: left of '->row' must point to struct/union
maporaclespatial.c(1140) : error C2275: 'msOracleSpatialLayerInfo' : illegal use
of this type as an expression
maporaclespatial.c(197) : see declaration of 'msOracleSpatialLayerInfo'
maporaclespatial.c(1141) : error C2275: 'msOracleSpatialHandler' : illegal use
of this type as an expression
maporaclespatial.c(175) : see declaration of 'msOracleSpatialHandler'
maporaclespatial.c(1141) : error C2223: left of '->orahandlers' must point to
struct/union
maporaclespatial.c(1143) : warning C4047: '==' : 'int ' differs in levels of
indirection from 'void *'
maporaclespatial.c(1160) : warning C4047: 'function' : 'struct
msOracleSpatialHandler *' differs in levels of indirection from 'int '
maporaclespatial.c(1160) : warning C4024: 'TRY' : different types for formal and
actual parameter 1
maporaclespatial.c(1160) : error C2223: left of '->stmthp' must point to
struct/union
maporaclespatial.c(1160) : error C2223: left of '->errhp' must point to struct/union
maporaclespatial.c(1161) : warning C4047: 'function' : 'struct
msOracleSpatialHandler *' differs in levels of indirection from 'int '
maporaclespatial.c(1161) : warning C4024: 'TRY' : different types for formal and
actual parameter 1
maporaclespatial.c(1161) : error C2223: left of '->svchp' must point to struct/union
maporaclespatial.c(1161) : error C2223: left of '->stmthp' must point to
struct/union
maporaclespatial.c(1161) : error C2223: left of '->errhp' must point to struct/union
maporaclespatial.c(1162) : warning C4047: 'function' : 'struct
msOracleSpatialHandler *' differs in levels of indirection from 'int '
maporaclespatial.c(1162) : warning C4024: 'TRY' : different types for formal and
actual parameter 1
maporaclespatial.c(1162) : error C2223: left of '->stmthp' must point to
struct/union
maporaclespatial.c(1162) : error C2223: left of '->errhp' must point to struct/union
maporaclespatial.c(1169) : error C2223: left of '->row_num' must point to
struct/union
maporaclespatial.c(1169) : error C2223: left of '->row' must point to struct/union
maporaclespatial.c(1175) : error C2223: left of '->items_query' must point to
struct/union
maporaclespatial.c(1176) : error C2223: left of '->items_query' must point to
struct/union
maporaclespatial.c(1191) : warning C4047: 'function' : 'struct
msOracleSpatialHandler *' differs in levels of indirection from 'int '
maporaclespatial.c(1191) : warning C4024: 'TRY' : different types for formal and
actual parameter 1
maporaclespatial.c(1191) : error C2223: left of '->stmthp' must point to
struct/union
maporaclespatial.c(1191) : error C2223: left of '->errhp' must point to struct/union
maporaclespatial.c(1192) : warning C4047: 'function' : 'struct
msOracleSpatialHandler *' differs in levels of indirection from 'int '
maporaclespatial.c(1192) : warning C4024: 'TRY' : different types for formal and
actual parameter 1
maporaclespatial.c(1192) : error C2223: left of '->errhp' must point to struct/union