'PVALUE' error with PROJ4 when building PHP MapScript??

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Thu Feb 17 10:00:29 EST 2005


I had encoutnter this problem too. The way I solved it is by modifying
the proj source code at a couple of places by replacing the PVALUE by
PARAMVALUE. There are only few occurences :

   - 2 occurences in .../src/pj_params.c
   - 2 occurences in .../src/projects.h

  After these changes the build was ok.

  Frank, Is it possible to make these changes in the CVS or does this
have other effects ?

later


Bob Bruce wrote:
> I have been trying to build the nightly build of MapServer, specifically
> PHP MapScript with PHP5 on a WIN2K system and have just got an error on a
> link that has me stumped and am wondering if someone can help me - please?
>
> The error is:
> C:\Program Files\Microsoft Visual Studio\VC98\include\winreg.h(88) : error
> C2371: 'PVALUE' : re
> definition; different basic types
>         c:\projects\proj-4.4.9/src\projects.h(178) : see declaration
> of 'PVALUE'
>
> which seems to indicate that there is a conflict between the definition of
> PVALUE in a VC++6 include file and a PROJ4 include file.
>
> I have built MapServer with WMS Client and Server and WFS Client and Server
> support to overcome build errors that I reported earlier this week. Now I
> have hit this error.
>
> thanks in advance for your help,
>
>      Bob Bruce, Winnipeg, Manitoba
>
> The statement in the build that this error occurs in is:
>
>         link /NODEFAULTLIB:libcd /dll /debug /out:php_mapscript.dll
> php_mapscript_util.obj php_
> mapscript.obj mapscript_i.obj ../../mapserver_i.lib
> c:/projects/gdwin32/bgd.lib        c:\proje
> cts\proj-4.4.9/src/proj_i.lib c:\projects\gdal-1.2.5/gdal_i.lib
> C:/Projects/curl-7.13.0/lib/li
> bcurl.lib     "C:\Program Files\Microsoft Visual Studio\VC98
> \Lib\WSOCK32.LIB"          C:\php-5
> .0.3\lib\php5ts.lib
> Microsoft (R) Incremental Linker Version 6.00.8447
> Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
>
>    Creating library php_mapscript.lib and object php_mapscript.exp
>         cl /nologo /Zi /W3 /DDEBUG /Fdphpms.pdb -DWIN32 -
> D_WIN32 /DZEND_WIN32 /DPHP_WIN32 /DPHP
> 4 /DZTS -Ic:/projects/gdwin32     -Ic:\projects\proj-4.4.9/src -IC:\php-
> 5.0.3/regex -DPHP_NO_AL
> IASES  -Ic:\projects\gdal-1.2.5/ogr/ogrsf_frmts -Ic:\projects\gdal-
> 1.2.5/ogr -Ic:\projects\gdal
> -1.2.5/port  -IC:/Projects/curl-7.13.0/include           -DHAVE_STRING_H -
> DREGEX_MALLOC -DNEED_
> STRCASECMP -DNEED_STRNCASECMP -DNEED_STRLCAT   -DWIN32 -D_WIN32   -
> DUSE_PROJ -DUSE_PROJ_API_H
>  -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_GIF -
> DGD_HAS_GDIMAGEGIFPTR -DUSE_GD_FT -DGD_
> HAS_GETBITMAPFONT -DUSE_OGR -DUSE_WMS_SVR  -DUSE_WMS_LYR  -
> DIGNORE_MISSING_DATA  -DENABLE_STDER
> R_DEBUG     -DUSE_WFS_SVR -DUSE_WFS_LYR     -DUSE_GD_ANTIALIAS     -I../.. -
> IC:\php-5.0.3 -IC:\
> php-5.0.3/main -IC:\php-5.0.3/zend -IC:\php-5.0.3/include -IC:\php-
> 5.0.3/tsrm /DCOMPILE_DL=1 /c
>  php_proj.c /Fophp_proj.obj
> php_proj.c
> C:\Program Files\Microsoft Visual Studio\VC98\include\winreg.h(88) : error
> C2371: 'PVALUE' : re
> definition; different basic types
>         c:\projects\proj-4.4.9/src\projects.h(178) : see declaration
> of 'PVALUE'
> C:\php-5.0.3/main\php_regex.h(36) : warning C4005: 'PHP_NO_ALIASES' : macro
> redefinition
>         unknown(0) : see previous definition of 'PHP_NO_ALIASES'
> NMAKE : fatal error U1077: 'cl' : return code '0x2'
> Stop.
>


--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the mapserver-users mailing list