Mapserver compilation with mygis on windows

Carsten M ünchenbach map at HYDRARGYRUM.DE
Mon Sep 5 07:41:04 EDT 2005


Hi Andreas,

thanks for the hint. It worked for mapjoin.c. But now it runs into errors
for mapmygis.c. I kind of expected it because I searched for the occurence
of <mysql/mysql> in all files and found it there. I also added #include
<winsock.h> as you recommended for mapmygis.c. But obviously there is also
something else missing. It's beyond my knowledge of c++ to find out what. Do
you or someone else got an idea? (tell me if I should translate the error
messages)

Thank you very much for your help,
Carsten

here are the subsequent compilation errors:

 ... AS  -DUSE_MYGIS    /c mapmygis.c /Fomapmygis.obj
mapmygis.c
mapmygis.c(246) : error C2065: 'u_int16_t' : nichtdeklarierter Bezeichner
mapmygis.c(246) : error C2065: 'shorts' : nichtdeklarierter Bezeichner
mapmygis.c(246) : warning C4047: '=' : Anzahl der Dereferenzierungen bei
'int ' und 'void *' unterschiedlich
mapmygis.c(246) : error C2106: '=' : Linker Operand muss ein L-Wert sein
mapmygis.c(247) : error C2065: 'u_int32_t' : nichtdeklarierter Bezeichner
mapmygis.c(247) : error C2065: 'longs' : nichtdeklarierter Bezeichner
mapmygis.c(247) : warning C4552: '*' : Operator hat keine Auswirkungen;
Operator mit Seiteneffekt erwartet
mapmygis.c(258) : error C2059: Syntaxfehler : ')'
mapmygis.c(259) : error C2100: Zeigeroperation ungueltig
mapmygis.c(259) : error C2100: Zeigeroperation ungueltig
mapmygis.c(262) : error C2059: Syntaxfehler : ')'
mapmygis.c(263) : error C2100: Zeigeroperation ungueltig
mapmygis.c(263) : error C2100: Zeigeroperation ungueltig
mapmygis.c(266) : error C2059: Syntaxfehler : ')'
mapmygis.c(267) : error C2100: Zeigeroperation ungueltig
mapmygis.c(267) : error C2100: Zeigeroperation ungueltig
mapmygis.c(269) : error C2100: Zeigeroperation ungueltig
mapmygis.c(269) : error C2100: Zeigeroperation ungueltig
mapmygis.c(277) : error C2143: Syntaxfehler : Fehlendes '{' vor '*'
mapmygis.c(313) : warning C4244: '=' : Konvertierung von 'unsigned __int64 '
in 'int ', moeglicher Datenverlust
mapmygis.c(511) : warning C4047: '=' : Anzahl der Dereferenzierungen bei
'char ' und 'void *' unterschiedlich
NMAKE : fatal error U1077: 'cl' : Rueckgabe-Code '0x2'
Stop.


On Mon, 5 Sep 2005 12:54:33 +0200, Andreas Albarello
<andreas.albarello at TERRITORIUMONLINE.COM> wrote:

>Carsten,
>
>you may try to replace
>
>#ifndef _mysql_h
>#include <c:\projects\mysql\include\mysql.h>
>#endif
>
>with the following:
>
>#ifndef _mysql_h
>#include <winsock.h>
>#include <c:\projects\mysql\include\mysql.h>
>#endif
>
>Hope this helps.
>
>Best regards,
>--
>--------------------------------------------------------------------
>Andreas Albarello
>Analysis & SW Development
>
>Territorium Online srl/GmbH
>Via Siemens-Straße 19 - I 39100 Bolzano/Bozen
>email: andreas.albarello at territoriumonline.com
>web:   www.territoriumonline.com
>--------------------------------------------------------------------
>
>Carsten Münchenbach wrote:
>> That's what I did: I'm sorry that I forgot to give you copies of the file:
>>
>> That's the path to MySQL Version 3.23.58 binary distribution, installed and
>> works
>> C:\projects\mysql
>>
>> here the concerning rows:
>> in NMAKE.opt
>>
>> #MYGIS
>> MYGIS_DIR = c:\projects\mysql
>> MYGIS=-DUSE_MYGIS
>>
>> ...
>>
>> #MyGIS support
>> !IFDEF MYGIS
>> MYGIS_INC=-I$(MYGIS_DIR)\include
>> MYGIS_LIB=$(MYGIS_DIR)\lib\opt\libmysql.lib "C:\Programme\Microsoft Visual
>> Studio\VC98\Lib\advapi32.lib"
>> !ENDIF
>>
>> ...
>> EXTERNAL_LIBS=$(GD_LIBS) $(TIFF_LIB) $(JPEG_LIB) \
>>      $(PROJ_LIB) $(OGR_LIB) $(GDAL_LIB)\
>>      $(CURL_LIB)  $(MING_LIB) $(PDF_LIB) \
>>      $(WINSOCK_LIB) $(POSTGIS_LIB) $(IMGGEN_LIB) $(ERR_LIB) \
>>      $(ORACLE_LIB) $(MYGIS_LIB) $(SDE_LIB) $(ICONV_LIB) $(FCGILIB)
>>
>> LIBS=$(MS_LIB) $(EXTERNAL_LIBS)
>> LIBS_DLL=$(MS_LIB_DLL) $(EXTERNAL_LIBS)
>>
>> INCLUDES=$(GD_INC) $(TIFF_INC) $(JPEG_INC)  \
>>          $(PROJ_INC) $(REGEX_INC) $(GDAL_INC) $(OGR_INC) \
>>          $(CURL_INC) $(MING_INC) $(PDF_INC) $(POSTGIS_INC) \
>>          $(IMGGEN_INC) $(ERR_INC) $(ORACLE_INC) $(MYGIS_INC) $(SDE_INC)\
>>          $(ICONV_INC) $(FCGIINC)
>>
>>
>> MS_DEFS = $(REGEX_OPT) $(STRINGS) $(POSTGIS)  -DWIN32 -D_WIN32 \
>>           $(EPPL) $(PROJ) $(TIFF) $(JPEG) $(GD) $(OGR) $(WMS) $(THREADS) \
>>           $(WMSCLIENT) $(MING) $(IGNORE_MISSING_DATA)
>> $(NEED_NONBLOCKING_STDERR) $(ENABLE_STDERR_DEBUG) \
>>           $(USE_POINT_Z_M) $(GDAL) $(FCGIDEF) \
>>           $(WFS) $(WFSCLIENT) $(WCS) $(PDF) $(EGIS) \
>>         $(USE_GD_ANTIALIAS) $(ORACLE) $(MYGIS) $(MING_VERSION) $(SDE_OPT)
>> $(ICONV)
>>
>> MS_CFLAGS=$(INCLUDES) $(MS_DEFS)
>>
>>
>> But still the same error. I looked up the mapjoin.c file at row 486
>>
>> #ifndef _mysql_h
>> #include <mysql/mysql.h>
>> #endif
>>
>> I don't know why _mysql_h is not defined.
>>
>> If I change it to
>>
>> #ifndef _mysql_h
>> #include <c:\projects\mysql\include\mysql.h>
>> #endif
>>
>> with my Path, mysql.h is found but the errors getting even more worse:
>>
>> c:\projects\mysql\include\mysql_com.h(117) : error C2061: Syntaxfehler :
>> Bezeichner 'SOCKET'
>> c:\projects\mysql\include\mysql_com.h(132) : error C2059: Syntaxfehler : '}'
>> c:\projects\mysql\include\mysql_com.h(162) : error C2143: Syntaxfehler :
>> Fehlendes ')' vor '*'
>> c:\projects\mysql\include\mysql_com.h(162) : error C2143: Syntaxfehler :
>> Fehlendes '{' vor '*'
>>
>> a.s.o.
>>
>> such syntax error in the mysql files that just can't be. I use the binary
>> distribution for windows.
>>
>>
>> Thanks for your help so far,
>> Carsten
>>
>>
>> On Mon, 5 Sep 2005 11:00:04 +0200, Bart van den Eijnden
>> <BEN at SYNCERA-ITSOLUTIONS.NL> wrote:
>>
>>
>>>You need to download mysql and set the correct path in nmake.opt.
>>>
>>>Best regards,
>>>Bart
>>>
>>>Bart van den Eijnden
>>>Syncera IT Solutions
>>>Postbus 270
>>>2600 AG  DELFT
>>>
>>>tel.nr.: 015-7512436
>>>email: BEN at Syncera-ITSolutions.nl
>>>
>>>
>>>>>>=?ISO-8859-15?Q?Carsten_M=FCnchenbach?= <map at HYDRARGYRUM.DE> 09/05/05
>>
>> 10:43 am >>>
>>
>>>Hi all,
>>>
>>>I manage to get MapSeerver compiled on Windows XP. It works fine without
>>>the mygis option. But know I urgently need MapServer with MyGIS support.
>>>Unfortunately I'm running into an error:
>>>
>>>cl /nologo /MD /W3 /DDEBUG -Ic:/projects/gdwin32 -Ic:\projects\proj-
>>>4.4.9/src -Ic:\projects\php-4.3.11/regex -DPHP_NO_ALIASES
>>>-Ic:\projects\gdal-1.2.6/gcore -Ic:\projects\gdal-1.2.6/alg
>>>-Ic:\projects\gdal-1.2.6/ogr -Ic:\projects\gdal-1.2.6/port
>>>-Ic:\projects\gdal-1.2.6/ogr/ogrsf_frmts -Ic:\projects\gdal-1.2
>>>.6/ogr -Ic:\projects\gdal-1.2.6/port  -Ic:/projects/curl-7.14.0/include
>>> -Ic:/projects/pdflib-6.0.0/pdflib      -Ic:\projects\mysql\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_STDERR_DEBUG   -DUSE_GDAL   -DUSE_WFS_SVR -DUSE_WFS_LYR
>>>-DUSE_WCS_SVR -DUSE_PDF   -DUSE_GD_ANTIALI
>>>AS  -DUSE_MYGIS    /c mapjoin.c /Fomapjoin.obj
>>>mapjoin.c
>>>mapjoin.c(486) : fatal error C1083: Include-Datei kann nicht geoeffnet
>>>werden: 'mysql/mysql.h': No such file or directory
>>>NMAKE : fatal error U1077: 'cl' : Rueckgabe-Code '0x2'
>>>
>>>What's going wrong? Ideas are ver appreciated!
>>>
>>>Thanks,
>>>Carsten
>>
>>



More information about the mapserver-dev mailing list