Opened 18 years ago

Last modified 17 years ago

#1651 new defect

Visual Studio 2005 build problem

Reported by: szekerest Owned by: mapserverbugs
Priority: high Milestone:
Component: Build Problems Version: 4.8
Severity: critical Keywords:
Cc:

Description

When compiling mapserver with Visual Studio 2005 the following error occurs:

cl /nologo /Zi /MD /EHsc /w /DDEBUG -Ic:/projects/gdwin32    
-Ic:\projects\proj-4.4.9/src -Ic:\projects\regex-0.12
-Ic:\projects\gdal-1.3.1/gcore -Ic:\projects\gdal-1.3.1/alg
-Ic:\projects\gdal-1.3.1/ogr -Ic:\projects\gdal-1.3.1/port
-Ic:\projects\gdal-1.3.1/ogr/ogrsf_frmts -Ic:\projects\gdal-1.3.1/ogr
-Ic:\projects\gdal-1.3.1/port  -Ic:/projects/curl-7.14.0/include  
-IC:\projects\postgresql-8.0.3\src/interfaces/libpq
-IC:\projects\postgresql-8.0.3\src/include      -Ic:\projects\usr\include 
-DHAVE_STRING_H -DREGEX_MALLOC -DNEED_STRCASECMP -DNEED_STRNCASECMP
-DNEED_STRLCAT -DUSE_POSTGIS  -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_THREAD 
-DUSE_WMS_LYR  -DIGNORE_MISSING_DATA  -DENABLE_STDERR_DEBUG   -DUSE_GDAL  
-DUSE_WFS_SVR -DUSE_WFS_LYR -DUSE_WCS_SVR    -DUSE_GD_ANTIALIAS    -DUSE_ICONV
/c c:\projects\regex-0.12\regex.c /Foc:\projects\regex-0.12\regex.obj
regex.c
c:\projects\regex-0.12\regex.c(4877) : error C2081: 'preg' : name in formal
parameter list illegal
c:\projects\regex-0.12\regex.c(4877) : error C2081: 'errbuf' : name in formal
parameter list illegal
c:\projects\regex-0.12\regex.c(4877) : error C2081: 'errbuf_size' : name in
formal parameter list illegal
c:\projects\regex-0.12\regex.c(4878) : error C2055: expected formal parameter
list, not a type list
c:\projects\regex-0.12\regex.c(4878) : error C2082: redefinition of formal
parameter 'errcode'
c:\projects\regex-0.12\regex.c(4886) : error C2059: syntax error : 'type'
c:\projects\regex-0.12\regex.c(4894) : 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'

This problem is dedicated to the old style (not ANSI compliant) function
definitions in regex.c like

size_t
regerror (errcode, preg, errbuf, errbuf_size)
    int errcode;
    const regex_t *preg;
    char *errbuf;
    size_t errbuf_size;
{
...}

Tamas Szekeres

Attachments (1)

regex.c (158.0 KB ) - added by fsimon@… 18 years ago.
New version of regex.c to work with Visual Studio 2005

Download all attachments as: .zip

Change History (3)

by fsimon@…, 18 years ago

Attachment: regex.c added

New version of regex.c to work with Visual Studio 2005

comment:1 by szekerest, 18 years ago

Ok, this fix could help. But I don't know how to handle it as a fix inside 
mapserver. Maybe it can be reported as a known issue. Thank you.

Tamas

comment:2 by bene, 17 years ago

Hi

Nice to find this one. I had the problem with Mapserver 5

Is downloading the attachement from here still the solution in MS5?

Bye Benedikt Rothe

Note: See TracTickets for help on using tickets.