[mapserver-users] Compiling errors (Windows)

Lisa Gaudette lgaudette at ehealthinformation.ca
Tue Feb 23 17:12:15 EST 2010

I'm running Visual Studio 2008 on XP and I've more or less followed the
instructions here: http://mapserver.org/installation/win32.html

A couple differences: I enabled "Optional RGBA palette png output", some of
the libraries have newer versions, etc.

I'm basically trying to get a basic version to use without a ton of
dependencies - I've got GD, Regex, and Proj, just like in the example. I
downloaded the code via mapserver-5.6.1.tar.gz. On my first attempts it
wasn't finding the gd.h files and such but I found that moving everything
from subfolders into one main folder worked.

The lines in Mapserver.h that are causing problems are:

inline void msBufferInit(bufferObj *buffer);
inline void msBufferResize(bufferObj *buffer, size_t target_size);
MS_DLL_EXPORT  inline void msBufferFree(bufferObj *buffer);
MS_DLL_EXPORT  inline void msBufferAppend(bufferObj *buffer, void *data,
size_t length);

And in MapBits.c, the errors come right after #include "mapserver.h"
MS_CVSID("$Id: mapbits.c 8755 2009-03-10 13:35:19Z jlacroix $") 

Although I expect in the 2nd case it's the errors in mapserver.h causing the

I tried a search on the errors and came up with nothing. Any ideas?

C:\Projects\MapServer>nmake /f Makefile.vc

Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl /nologo /Ox /MD /W3  /EHsc -IC:\projects\gd    
7.0/src -Ic:\projects\regex-0.12                   -I\include    
NTIALIAS           -DUSE_AGG      -DWIN32 -D_WIN32 /c mapbits.c
c:\projects\mapserver\mapserver.h(2601) : error C2054: expected '(' to
follow 'i
c:\projects\mapserver\mapserver.h(2601) : error C2085: 'msBufferInit' : not
in f
ormal parameter list
c:\projects\mapserver\mapserver.h(2602) : error C2061: syntax error :
c:\projects\mapserver\mapserver.h(2603) : error C2370: 'inline' :
different storage class
        c:\projects\mapserver\mapserver.h(2601) : see declaration of
c:\projects\mapserver\mapserver.h(2603) : error C2054: expected '(' to
follow 'i
c:\projects\mapserver\mapserver.h(2603) : error C2085: 'msBufferFree' : not
in f
ormal parameter list
c:\projects\mapserver\mapserver.h(2604) : error C2082: redefinition of
formal pa
rameter 'inline'
c:\projects\mapserver\mapserver.h(2604) : error C2143: syntax error :
missing ';
' before 'type'
c:\projects\mapserver\mapserver.h(2604) : error C2085: 'msBufferAppend' :
not in
 formal parameter list
mapbits.c(35) : error C2085: 'ms_cvsid' : not in formal parameter list
mapbits.c(35) : error C2143: syntax error : missing ';' before '='
mapbits.c(35) : error C2065: 'ms_cvsid' : undeclared identifier
mapbits.c(35) : warning C4047: ':' : 'char *' differs in levels of
indirection f
rom 'int'
NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio
\cl.EXE"' : return code '0x2'

View this message in context: http://n2.nabble.com/Compiling-errors-Windows-tp4622200p4622200.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

More information about the mapserver-users mailing list