[mapserver-users] compiling on windows

Florin A. pianosnake at gmail.com
Mon Apr 7 17:29:04 EDT 2008


The message says to disable deprecation.  Deprecation is disabled in
nmake.opt  inside OPTFLAGS  but then there is another OPTFLAGS that enables
it again only a few lines later.

The first one on line 92:

OPTFLAGS =    /nologo /Ox /MD $(WARNING_LEVEL) $(DEBUG) /EHsc
/D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE

And then on line 98:

OPTFLAGS =    /nologo /Ox /MD $(WARNING_LEVEL) $(DEBUG) /EHsc

I commented out the second one, and the errors now are:

regex.c
C:\projects\regex-0.12\regex.c(2834) : warning C4047: '=' : 'regoff_t *'
differs in levels of indirection from 'int'
C:\projects\regex-0.12\regex.c(4876) : warning C4996: 'errcode' was declared
deprecated
        C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\crtdefs.h(506)
: see declaration of 'errcode'
        Message: 'This name was supported during some Whidbey pre-releases.
Instead, use the standard name errno_t.'
C:\projects\regex-0.12\regex.c(4876) : error C2081: 'preg' : name in formal
parameter list illegal
C:\projects\regex-0.12\regex.c(4876) : error C2081: 'errbuf' : name in
formal parameter list illegal
C:\projects\regex-0.12\regex.c(4876) : error C2081: 'errbuf_size' : name in
formal parameter list illegal
C:\projects\regex-0.12\regex.c(4877) : error C2055: expected formal
parameter list, not a type list
C:\projects\regex-0.12\regex.c(4877) : error C2082: redefinition of formal
parameter 'errcode'
C:\projects\regex-0.12\regex.c(4885) : warning C4996: 'errcode' was declared
deprecated
        C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\crtdefs.h(506)
: see declaration of 'errcode'
        Message: 'This name was supported during some Whidbey pre-releases.
Instead, use the standard name errno_t.'
C:\projects\regex-0.12\regex.c(4885) : error C2059: syntax error : 'type'
C:\projects\regex-0.12\regex.c(4893) : error C2275: 'errcode' : illegal use
of this type as an expression
        C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\crtdefs.h(506)
: see declaration of 'errcode'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
8\VC\BIN\cl.EXE"' : return code '0x2'
Stop.





On Mon, Apr 7, 2008 at 2:54 PM, Florin A. <pianosnake at gmail.com> wrote:

> Hi Frank,
>
> I forgot the rest....
>
> C:\projects\regex-0.12\regex.c(4079) : warning C4018: '>=' :
> signed/unsigned mismatch
> C:\projects\regex-0.12\regex.c(4110) : warning C4018: '<=' :
> signed/unsigned mismatch
> C:\projects\regex-0.12\regex.c(4123) : warning C4018: '<=' :
> signed/unsigned mismatch
> C:\projects\regex-0.12\regex.c(4293) : warning C4018: '>=' :
> signed/unsigned mismatch
> C:\projects\regex-0.12\regex.c(3771) : warning C4101: 'destination' :
> unreferenced local variable
> C:\projects\regex-0.12\regex.c(3918) : warning C4101: 'destination' :
> unreferenced local variable
> C:\projects\regex-0.12\regex.c(3971) : warning C4101: 'destination' :
> unreferenced local variable
> C:\projects\regex-0.12\regex.c(4110) : warning C4101: 'destination' :
> unreferenced local variable
> C:\projects\regex-0.12\regex.c(4123) : warning C4101: 'destination' :
> unreferenced local variable
> C:\projects\regex-0.12\regex.c(4876) : warning C4996: 'errcode' was
> declared deprecated
>         C:\Program Files\Microsoft Visual Studio
> 8\VC\INCLUDE\crtdefs.h(506) : see declaration of 'errcode'
>         Message: 'This name was supported during some Whidbey
> pre-releases. Instead, use the standard name errno_t.'
> C:\projects\regex-0.12\regex.c(4876) : error C2081: 'preg' : name in
> formal parameter list illegal
> C:\projects\regex-0.12\regex.c(4876) : error C2081: 'errbuf' : name in
> formal parameter list illegal
> C:\projects\regex-0.12\regex.c(4876) : error C2081: 'errbuf_size' : name
> in formal parameter list illegal
> C:\projects\regex-0.12\regex.c(4877) : error C2055: expected formal
> parameter list, not a type list
> C:\projects\regex-0.12\regex.c(4877) : error C2082: redefinition of formal
> parameter 'errcode'
> C:\projects\regex-0.12\regex.c(4885) : warning C4996: 'errcode' was
> declared deprecated
>         C:\Program Files\Microsoft Visual Studio
> 8\VC\INCLUDE\crtdefs.h(506) : see declaration of 'errcode'
>         Message: 'This name was supported during some Whidbey
> pre-releases. Instead, use the standard name errno_t.'
> C:\projects\regex-0.12\regex.c(4885) : error C2059: syntax error : 'type'
> C:\projects\regex-0.12\regex.c(4893) : error C2275: 'errcode' : illegal
> use of this type as an expression
>         C:\Program Files\Microsoft Visual Studio
> 8\VC\INCLUDE\crtdefs.h(506) : see declaration of 'errcode'
> C:\projects\regex-0.12\regex.c(4910) : warning C4996: 'strcpy' was
> declared deprecated
>         Message: 'This function or variable may be unsafe. Consider using
> strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRE
> CATE. See online help for details.'
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
> 8\VC\BIN\cl.EXE"' : return code '0x2'
> Stop.
>
>
>
>
>
>
>
>
>
>
>
>
> On Mon, Apr 7, 2008 at 2:03 PM, Frank Warmerdam <warmerdam at pobox.com>
> wrote:
>
> > Florin A. wrote:
> >
> > > Hello,
> > >
> > > I'm trying to compile MapServer on Windows Server 2003.  I followed
> > > all the instructions on
> > > http://mapserver.gis.umn.edu/docs/howto/win32_compiling and I'm stuck
> > > with regex errors.  The errors are the same as this post
> > > http://www.mail-archive.com/mapserver-users@lists.umn.edu/msg15996.html
> > > I'm compiling with nmake from Microsoft Visual Studio 8
> > >
> > > I also tried compiling with the buildkit from
> > > http://download.osgeo.org/buildkit/  and got the same errors.
> > >
> > > regex.c
> > > C:\projects\regex-0.12\regex.c(768) : warning C4018: '<' :
> > > signed/unsigned mismatch
> > >
> > ...
> >
> > > C:\projects\regex-0.12\regex.c(1953) : warning C4018: '>' :
> > > signed/unsigned mismatch
> > >
> > >
> > > I tried the correction mentioned for the regex.c file:
> > >
> > > //extern void printchar ();
> > > void printchar( int i ) {}
> > >
> > >
> > > This made no difference. I also tried with the win32 regex
> > > distribution from http://people.delphiforums.com/gjc/gnu_regex.exe and
> > > again, exactly the same errors.
> > >
> > > Has anybody else encountered this regex error?  Shouldn't nmake work
> > > with no problems on the buildkit ?
> > >
> >
> > Florin,
> >
> > The above are just warnings.  I would encourage you to just ignore them
> > and proceed.
> >
> > Best regards,
> > --
> >
> > ---------------------------------------+--------------------------------------
> > I set the clouds in motion - turn up   | Frank Warmerdam,
> > warmerdam at pobox.com
> > light and sound - activate the windows | http://pobox.com/~warmerdam<http://pobox.com/%7Ewarmerdam>
> > and watch the world go round - Rush    | President OSGeo,
> > http://osgeo.org
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080407/e7e9bdbf/attachment.html


More information about the mapserver-users mailing list