高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】large compiled file size
large compiled file size
large compiled file size
i have written a dll using the latest dwgdirect that simply returns
references and raster images to the caller. all is great, except for
the fact that the dll is 3.6 mb!!
i am using the implementations of the hostappservices and system services
that is provided with odreadex. i excluded files from the build
that aren't used, but the file size is still rather large. does anyone
have any tips as to how i can reduce this for such a simple app?
if you need me to post any code or anything, i will be happy to.
thanks!
probably you're linking with the static libraries of dwgdirect and they are inserted to your binary output.
link with the dynamic ones, but you'll have to redistribute them with your product - probably it is dd_db that is the bad one...
dynamic linking should go if you have several projects connected to dwgdirect, but if you have only one project, you probably have to accept this size.
regards
chudomir
yes, i am statically linking the libraries and this is really the only
thing i am using dwgdirect for so static linking made sense.
i am using the release libraries as to get rid of the debug code.
i can manage this size, but it would be cool if i could reduce it. if i
can't, i will live with it
if you used odreadex as a base have you removed calls to :drxinitmodelergeometry() and :drxuninitmodelergeometry() ?
if your application needs no acis vectorization or converting between dwg r18 and other formats you need no these calls and linking with acisbuilder, acisrenderer and modelergeometry
sergey slezkin
quote:
originally posted by sergey slezkin
if you used odreadex as a base have you removed calls to :drxinitmodelergeometry() and :drxuninitmodelergeometry() ?
if your application needs no acis vectorization or converting between dwg r18 and other formats you need no these calls and linking with acisbuilder, acisrenderer and modelergeometry
thanks for the reply. i am not using those calls, so those libs shouldn't
be linking.
i have attached a file that has the code i have written. i have the
appropriate implementations from odreadex, such as the system
services and hostappservices so that it will compile. i found i also
need to include exgienhancedmetafile, exgirasterimage, exodstorage, exodfilebuff for the project to build. these are
dependencies of systemservices and hostappservices.
attached files (5.1 kb, 15 views)
you can comment out most of this dependencies from exservices (simply return null for metafile, raster image etc.)
odfilebuf is required until you replace it with your own implementation.
sergey slezkin
i commented some of the code out and was able to reduce the size a
bit, but i think that's just the size it has to be. thanks!
|