几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


回复
 
主题工具 搜索本主题 显示模式
旧 2009-05-06, 06:19 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】naming convention of dlls cause problems

naming convention of dlls cause problems
naming convention of dlls cause problems
we have (in 1.12 vs 2003) run into problems when testing our apps using the toolkit: the debug and release dlls have the same names but a debug build of our program cannot use the toolkit release dlls and vice versa. that is; no error message, just a gp and great confusion for the testers and developers.
i also have the following consern regarding using the same dll name across versions of the toolkit:
program from vendor a installs 1.12 release dlls.
program from vendor b installs 1.13 release dlls and overwrites the 1.12 dlls.
if the 1.13 dlls are not 100% backward compatible with 1.12, then the program from vendor a will break. i suspect this will be a problem for vendor a's support to detect and solve for the user.
are these problems considered?
is there a solution for this?
if this is not a deliberate design decision; could you consider having different dll names based on debug/release and version?
-rune jorgensen
www.dds.no
>program from vendor a installs 1.12 release dlls.
>program from vendor b installs 1.13 release dlls and overwrites the 1.12 >dlls.
it seem to be highly improbable that programs from different vendors are installed in the same location
i think no reasonable vendor installs libraries in system folders anymore
you could use the static lib files instead of linking into the dll's. that way you don't have to ship any of the dll's, but the cost is that your application will become quite large.
quote:
... but the cost is that your application will become quite large.
exactly. and loading time will increase too, because about half of the dlls are loaded dynamically on demand.
(most of the new functionality is coming as drx modules now)
quote:
originally posted by rune jørgensen
the debug and release dlls have the same names but a debug build of our program cannot use the toolkit release dlls and vice versa. that is; no error message, just a gp and great confusion for the testers and developers.
hi,
rune, and could you debug into the crash, and see what is in the call stack ?
(in case you're interested in using mixed release-debug builds)
quote:
originally posted by dmitry a. novikov
hi,
rune, and could you debug into the crash, and see what is in the call stack ?
(in case you're interested in using mixed release-debug builds)
in dd1.12 i had problems with memorymanagment by using dd release with our debug dlls.
we are using following name conventions :
name+ versionnumber + d for debug dlls/libs.
may be it´s a solution for dd.
> in dd1.12 i had problems with memorymanagment
> by using dd release with our debug dlls.
that is our experience as well. the heap seems to get corrupted when mixing dd release dlls with ms debug msvcr71d.dll.
msvcr71d.dll!_crtisvalidheappointer(const void * puserdata=0x01f93580)
msvcr71d.dll!_free_dbg_lk(void * puserdata=0x01f93580, int nblockuse=1)
msvcr71d.dll!_free_dbg(void * puserdata=0x01f93580, int nblockuse=1)
mfc71d.dll!operator delete(void * p=0x01f93580)
mfc71d.dll!operator delete[](void * p=0x01f93580)
it will not break like this if we use the dd release dlls with ms release dlls or dd debug dlls with ms debug dlls. note that ms themselves use version number in the dll name and add a d if it is a debug dll to avoid a mix of incompatible dlls to be loaded.
-rune jorgensen
www.dds.no
quote:
..
mfc71d.dll!operator delete(void * p=0x01f93580)
mfc71d.dll!operator delete[](void * p=0x01f93580)
and what is further up the stack?
i mean - what object is being deleted?
quote:
originally posted by wvk
and what is further up the stack?
i mean - what object is being deleted?
that´s our answer from vladimir kalinin
in 1.12 we overloaded new/delete operators,
and it seems that compiler used our "new" in first dll
and crt "delete" in the second.
there are some oddities in debug allocation routines in vc++,
and is better not to mix debug and release dlls when new/delete are
overloaded.
but in the future we will take this scenario into account.
perhaps in 1.13 this will work immediately,
because we were fixing some connected issues,
debugging our new custom memory management.
1.13 is being released just now (tomorrow perhaps).
best regards,
vladimir kalinin
well, i didn't say this scenario is not working at all, it just requires more attention to memory management issues. and, as i said, in 1.13 we fixed a lot of connected problems, debugging our custom heap.
after all, our samples are working in debug mode, being linked with release dlls. i do not say that our samples are as complex as real applications, but there are illustrated a lot of techniques, and memory is used extensively enough.
so, it seems that this problem can be fixed, but anyway, to fix the issue, we need more info.
of course if it will appear that this is not dd bug, and is not obvious client bug, then renaming dlls should be discussed/considered.
vladimir
if the intention is that dd release dlls should actually work with ms debug dlls and vice versa, then i will try it out with 1.13 first. then i can dig into debug details if it still fails.
-rune jorgensen
www.dds.no
at least it is not intended that they should not
vladimir

i've now tested dd 1.13 with visual studio 6.0. here dd debug dlls can be used with our release build and vice versa.
-rune jorgensen
www.dds.no
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】getting nulls when calling across dlls yang686526 DirectDWG 0 2009-05-05 11:31 AM
【转帖】dwf printing problems yang686526 DirectDWG 0 2009-05-05 07:51 AM
【转帖】dlls for vs .net 2003 yang686526 DirectDWG 0 2009-05-04 07:58 PM
【转帖】dll学习(资料收集) huangyhg vc编程 0 2008-05-17 09:24 PM


所有的时间均为北京时间。 现在的时间是 01:44 PM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多