[geos-devel] Geos 3 library size
Tim Mitchell
t.mitchell at aranz.com
Mon Jan 14 15:07:25 EST 2008
Frank,
Thanks for that. The geos_c.dll is less than 1 Mb so I think I'll just
ignore the lib problem for now - bigger fish to fry ATM.
The makefile didn't work for me and I gave up after half an hour - I
might try it again later.
Thanks
Tim
Frank Warmerdam wrote:
> Tim Mitchell wrote:
>> Hi,
>>
>> I'm new to geos and have just downloaded an svn snapshot and built
>> the libraries on windows XP using the visual studio solution files in
>> build/msvc80 using 2005 Express edition. I am using the library via
>> the shapely python interface and it seems to work.
>>
>> However the resulting geos.lib is 113Mb which is twice the size of
>> the debug build (47 Mb). I find hard to believe the release lib is
>> bigger than the debug lib and all this from 6Mb of source (using it
>> will triple the size of my app!!). I am a C person and have never
>> touched C++ before and I just wanted to check that these file sizes
>> are correct.
>
> Tim,
>
> I build GEOS with the nmakefile's and I see:
>
> warmerda at gdal3200% ls -l *.lib
> -rwxr-xr-x 1 warmerda None 19677468 Dec 20 17:32 geos.lib
> -rwxr-xr-x 1 warmerda None 23382 Dec 20 17:32 geos_c_i.lib
> -rwxr-xr-x 1 warmerda None 23160 Dec 11 23:39 geos_i.lib
>
> warmerda at gdal3200% ls -l *.dll
> -rwxr-xr-x 1 warmerda None 823296 Dec 20 17:32 geos_c_fw.dll
> -rwxr-xr-x 1 warmerda None 978944 Dec 20 17:32 geos_fw.dll
>
> I find it bizarre that your release build should be so much larger
> than the debug build. But I don't think the size of the .lib file
> is a reflection on what will actually end up in your linked .exe or
> .dll as all sorts of stuff tends to get duplicated in each .obj in a .lib
> file, but then boiled by down by the linker when producing a dll or exe.
>
> Looking at my build, I suspect that the C DLL is linking in a copy of
> all used code from the main C++ DLL which I think I'll look into. It
> wasn't
> my expectation that this would happen and it isn't how things work
> on linux. But that isn't your problem.
>
> So my advice is to look instead at the size of DLL that ends up being
> used by Shapely and determine if that is large or not. Make sure it
> gets built without debug info when checking the size. If that is still
> huge, consider building GEOS with the nmakefile's instead of the
> solutions.
> (or perhaps carefully compare the build options).
>
> Best regards,
--
Tim Mitchell
Software Engineer
Applied Research Associates (NZ) Ltd. (www.aranz.com)
Ph: +64 (3) 374-6120 ext: 203
Fax: +64 (3) 374-6130
Skype: tim-mitchell
More information about the geos-devel
mailing list