[Mapserver-dev] Building .exes with DLLs on windows

Pericles S. Nacionales nacional at cbs.umn.edu
Fri Apr 9 14:35:46 EDT 2004


Hi Assefa,

Is this on CVS yet?  I'd like to try it out now that I've upgraded to
MSVC7.

Thanks,
Perry

On Wed, 2004-04-07 at 17:51, Yewondwossen Assefa wrote:
> Frank,
> 
>   I did a couple of tests locally  to be able to have mapserver.dll build.
> 
> #if defined(_WIN32) && !defined(__CYGWIN__)
> #  define MS_DLL_EXPORT     __declspec(dllexport)
> #else
> #define  MS_DLL_EXPORT
> #endif
> 
> and most of the protoypes defined in the .h files are declared using the 
> MS_DLL_EXPORT : MS_DLL_EXPORT int msSaveMap(mapObj *map, char *filename);
> 
> 
>   The size of the binaries are:
> 
> -rwxr-xr-x+   1 fs       None        53297 Apr  7 18:23 legend.exe
> -rwxr-xr-x+   1 fs       None       335922 Apr  7 18:23 mapserv.exe
> -rwxr-xr-x+   1 fs       None      4137012 Apr  7 18:23 mapserver.dll
> -rwxr-xr-x+   1 fs       None      2100568 Apr  7 18:23 mapserver.lib
> -rwxr-xr-x+   1 fs       None       473530 Apr  7 18:23 mapserver_i.lib
> -rwxr-xr-x+   1 fs       None        53299 Apr  7 18:23 scalebar.exe
> -rwxr-xr-x+   1 fs       None        65586 Apr  7 18:23 shp2img.exe
> -rwxr-xr-x+   1 fs       None        57394 Apr  7 18:23 shptree.exe
> -rwxr-xr-x+   1 fs       None        65586 Apr  7 18:23 sortshp.exe
> -rwxr-xr-x+   1 fs       None        69682 Apr  7 18:23 tile4ms.exe
> 
>   I have tried locally the mapserv.exe and It seems to run fine.
> 
>   I have also modified the windows makefile to be able to switch between 
> dll and static modes.
> 
>   Not sure If I should go ahead and commit the changes. Any thoughts ?
> 
> Later,
> 
> 
> Frank Warmerdam wrote:
> > Yewondwossen Assefa wrote:
> > 
> >>  There should not be any problems on the mapserver side. What "scares" 
> >> me more is modifing the build for the other dependent libararies to 
> >> produce dll's and libs that are usable by mapserver. Sometimes It is 
> >> just a fight to have these libraries build on windows and makefiles, 
> >> when provided, are not as easy to work as it is in Gdal for example. I 
> >> will try to gradullay port all the librairies.
> > 
> > 
> > Assefa,
> > 
> > I don't particularly want to factor all the other dependent libraries out
> > as DLLs if they aren't already.  For all the ones that are currently
> > statically linked into mapserv.exe, they can also be statically linked into
> > libmap.dll.  Based on this assumption there shouldn't be any need to change
> > the dependent libraries, which I agree can be kind of scary.
> > 
> > Best regards,
> 




More information about the mapserver-dev mailing list