[Mapserver-users] Compiling PHP_MapScript.dl...

Mike Leahy mgleahy at fes.uwaterloo.ca
Wed Apr 7 05:55:33 PDT 2004


Okay list...here's my progress since yesterday:

I compiled MapServer 4.0.1 with the following config:
 
./configure \
--with-jpeg \
--with-gd=/usr \
--with-freetype=/usr \
--with-zlib=/usr \
--with-png=/usr \
--with-pdf=/usr \
--with-tiff=/usr \
--without-eppl \
--with-proj=/usr \
--with-ogr=/usr/bin/gdal-config \
--with-gdal=/usr/bin/gdal-config \
--with-postgis=/usr/bin/pg_config \
--with-wfs \
--with-wmsclient \
--with-wfsclient \
--with-curl-config=/usr/bin/curl-config \
--disable-ignore-missing-data \
--with-php=/usr/src/php-4.3.5
 
I'm successful up to this point.  :)
 
Now I'm stuck with several *.o files in place of the DLL that I actually need 
for PHP_MapScript.  So...I went through a lengthy goose chase, and eventually 
compiled all the *.lib versions of the library components I originally built 
in Cygwin.  I finally got everything (I think) compiled that was needed to 
create the PHP_MapScript.dll using the makefile.vc.  I thought I finally had 
it, then got the following from running nmake:
 
D:\Downloads\Programs\Progra~1\MapServer\VCProject\postgresql-7.4.2
\src/interfaces/libpq/libpqdll.lib      .
./../libmap.a  D:\Downloads\Programs\Progra~1\MapServer\VCProject\php-4.3.5-
Win32\lib\php4ts.lib
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
 
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _atoi already defined in 
 
      Etc....
 
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __strdup already defined in LIBC.lib
(strdup.obj)
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _atoi already defined in LIBC.lib
(atox.obj); second definition ignored
 
      Etc....
 
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: __strdup already defined in LIBC.lib
(strdup.obj); second definition ignored
   Creating library php_mapscript.lib and object php_mapscript.exp
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; 
use /NODEFAULTLIB:library
php_mapscript.o : error LNK2001: unresolved external symbol _sapi_module
libmap.a(mapparser.o) : error LNK2001: unresolved external symbol __alloca
 
      Etc....
 
libmap.a(mappostgis.o) : error LNK2001: unresolved external symbol _rindex
libmap.a(maphttp.o) : error LNK2001: unresolved external symbol _select
php_mapscript.dll : fatal error LNK1120: 59 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.
 
I'm guessing this is because I compiled MapServer in Cygwin and now I'm trying 
to get a Win-compatible DLL from the same package.  If I'm wrong, can anyone 
suggest what I need to fix next?  If so, I'm now looking at figuring out how 
to compile MapServer using MSVC.  So far that's looking a bit scary.  I got 
pretty far with respect to the libs needed for the MapScript DLL, but I'm 
already running into problems getting all the requirements setup for 
MapServer, particularly regarding PHP and Regex. 
 
Any suggestions?
 
Thanks,
Mike

 


----------------------------------------
This mail sent through www.mywaterloo.ca



More information about the MapServer-users mailing list