[mapserver-users] Compiling errors (Windows)

Tamas Szekeres szekerest at gmail.com
Tue Feb 23 18:11:11 EST 2010


Lisa,

You should anyway specify the compiler version, it may not be related to
this problem though:

nmake -f makefile.vc MSVC_VER=1500

In this case your compiler version doesn't seem to define the inline
keyword.
My nmake version reports 9.00.30729.01 which is able to compile the code
without problems. You might have to upgrade with a Service Pack or replace
'inline' with '__inline' inside the code.


For an easy way of the compilation you could also download an use the
prepared build SDKs (ie: http://vbkto.dyndns.org/sdk/release-1500-dev.zip).
Extract this into an arbitrary location and type 'nmake ms' in the root
directory by using the VS 2008 Command Prompt.

Best regards,

Tamas




2010/2/23 Lisa Gaudette <lgaudette at ehealthinformation.ca>

>
> 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
> problem.
>
> 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
> -IC:\projects\proj-4.
> 7.0/src -Ic:\projects\regex-0.12                   -I\include
> -DHAVE_STRING_
> H -DREGEX_MALLOC -DNEED_STRCASECMP -DNEED_STRNCASECMP -DNEED_STRLCAT
> -DNEED_STRR
> STR -DNEED_STRCASESTR    -DUSE_PROJ -DUSE_PROJ_API_H   -DUSE_GD_PNG
> -DUSE_GD_JPE
> G -DUSE_GD_WBMP -DUSE_GD_GIF -DGD_HAS_GDIMAGEGIFPTR  -DGD_HAS_GETBITMAPFONT
> -DGD
> _HAS_FTEX_XSHOW   -DUSE_THREAD    -DIGNORE_MISSING_DATA
> -DUSE_GD_A
> NTIALIAS           -DUSE_AGG      -DWIN32 -D_WIN32 /c mapbits.c
> /Fomapbits.obj
> mapbits.c
> c:\projects\mapserver\mapserver.h(2601) : error C2054: expected '(' to
> follow 'i
> nline'
> 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 :
> identifier
>  'inline'
> c:\projects\mapserver\mapserver.h(2603) : error C2370: 'inline' :
> redefinition;
> different storage class
>        c:\projects\mapserver\mapserver.h(2601) : see declaration of
> 'inline'
> c:\projects\mapserver\mapserver.h(2603) : error C2054: expected '(' to
> follow 'i
> nline'
> 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
> 9.0\VC\BIN
> \cl.EXE"' : return code '0x2'
> Stop.
>
> C:\Projects\MapServer>
> --
> 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.
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100224/b1a7949a/attachment-0001.html


More information about the mapserver-users mailing list