日历
网志分类
展开全部
· ***    All     ***
· ***    Mood    ***
· ***    Life    ***
· *** Technology ***
· ***     Yc     ***
· ***  Cartoon   ***
· *** Collection ***
· ***  Unsorted  ***
媒体播放器

Get the Flash Player to see this player.
SkyDrive is currently not available.

站内搜索
友情链接
· 我的歪酷 非非共享界
· 风雨妖虹
· kingbeful@csdn
· 手心的太阳@瞬间十年
· Moment@Travis
· 江南麒麟居
· εз毛线团εз
· 乌拉的neverland
· 碾过的日子 闲也陶陶
· 狡兔三窟 *^.^*
· 橄榄林的风
· 水色の街
· Powerful and delicate, Life struggling
· 阿德咖吧
· 陷阱
· 风之华
· vkobe的Neverland@@
· 白日梦已死 · 伤越夜海
· 望天
· 空の軌跡
· 没什么好东西的空间
· 心情...咖啡屋
· 随风独自凉
· Some where i belong
· .★·°双晨·故事°☆ .
· BigWorld的记事本
· *Sara's*
· 人生若只如初见
· 宠辱不惊闲看庭前花开花落·去留无意漫随天外云卷云舒
· 我思我不在
· 飞扬飘雨
· lazy的猫猫
常用链接
· [Google]
· [Google Accounts]
· [IT Items]
· [Telnet@Yanxi]
· [Wikipedia]
· [Linux Manpages]
· [Mofile.com]
· [163888.net]
· [fm.qq.com]
· [Proxy]
· [Animepaper.net]
· [FreeproxySite]
· [gonwan@fc2]
· [skydrive.live.com]
· [gonwan@lifelogger]

订阅 RSS

0109805

歪酷博客

逆さまの蝶
In this Craziness
Uncertainy
一人一人の想いを
僕らは何処かに遺せるだろうか

In this Craziness
You gave me life
一つの想いを
僕らは何処まで守れるだろうか



« 上一篇: qterm 0.4.1 binary 下一篇: QT vs2005编译环境搭建 »
丸子·酱 @ 2008-08-20 10:58

    今天, 我们继续解决vs2005编译, link到msvcr80.dll, 但是找不到dll的问题.
    可以先看一下之前的某篇文章: VC++ Redistributable Package 的作用 = =b

    Redistributing Visual C++ Files
    这篇实际上就是描述了要发布link到crt的时候, 应该怎么做, 以及会出现的问题, 这些在之前都提过.

    Troubleshooting C/C++ Isolated Applications and Side-by-side Assemblies
    告诉我们如下有用的信息:
1. Building Visual C++ projects without manifest generation is not supported. Any C/C++ program built in Visual C++ 2005 has to include a manifest describing its dependencies on Visual C++ libraries.
2. If the manifest is embedded inside the binary, ensure that the ID of RT_MANIFEST is correct for this type of the binary. For applications, ID should be equal to 1, for most DLLs ID should be equal to 2.
3. On Windows XP, if an external manifest is present in the application's local folder, the operating system loader uses this manifest instead of a manifest embedded inside the binary. On Windows Server 2003 and later versions of Windows, the opposite is true—the external manifest is ignored and the embedded manifest is used when present.
4. It is recommended that all DLLs have a manifest embedded inside the binary. External manifests are ignored when a DLL is loaded though a LoadLibrary call.
5. the CRT assembly can also be installed as a private side-by-side assembly in the application's local folder. If the operating system fails to find the CRT or any other assembly as a shared assembly, it starts looking for the assembly as a private assembly. It searches for private assemblies in the following order:
    *) Check the application local folder for a manifest file with name <assemblyName>.manifest. In this example, the loader tries to find Microsoft.VC80.CRT.manifest in the same folder as appl.exe. If the manifest is found, the loader loads the CRT DLL from the application folder. If the CRT DLL is not found, load fails.
    *) Try to open folder <assemblyName> in appl.exe's local folder and if it exists, load manifest file <assemblyName>.manifest from this folder. If the manifest is found, the loader loads the CRT DLL from <assemblyName> folder. If the CRT DLL is not found, load fails.
    最后一个解决了我们的问题 !!
    这里有一篇文章告诉我们, 怎么诊断SxS的error: Diagnose SideBySide failures in Windows XP/Windows Server 2003

    这里有一个side-by-side assembly(SxS) 的概念. 首先是assembly, 程序集, 疑似.NET的概念啊.
    A Windows side-by-side assembly is described by manifests. A side-by-side assembly contains a collection of resources—a group of DLLs, Windows classes, COM servers, type libraries, or interfaces—that are always provided to applications together. These are described in the assembly manifest.
    SxS assembly解决的是一个dll versioning conflicts的问题, 方法是通过一个manifest文件.
    然后是isolation applicaton的概念.
    Isolated applications are self-describing applications installed with manifests. Isolated applications can use both private assemblies and shared assemblies.
    好的, 越说越离谱了, 又牵涉到了private assemblyshared assemblies.
    A private assembly is an assembly that is deployed with an application and is available for the exclusive use of that application. That is, other applications do not share the private assembly.
    A shared assembly is an assembly available for use by multiple applications on the computer. On Windows Vista and Windows XP, side-by-side assemblies can be installed as shared assemblies. Shared side-by-side assemblies are not registered globally on the system, but they are globally available to applications that specify a dependence on the assembly in manifests.
    是不是糊涂了.. 个么SxS assembly和private/shared assembly到底是个什么关系呢? SxS只是一种机制, 加一个manifest文件, 来避免dll的版本冲突. 而private/shared是具体的实现方式. 举个例子, vs2005的crt dll默认使用的方式就是shared SxS assembly, 而如果我们把vs2005的crt dll放到应用程序的当前目录下, 在建立一个manifest文件, 那么这就是private SxS assembly.

    dll 版本冲突, 也叫做dll hell, 是个什么东西: The End of DLL Hell. 而且很久很久以前就有了相对于的解决方案: Implementing Side-by-Side Component Sharing in Applications (Expanded). 那如果不是SxS assembly, 像一般的dll调用算什么? DLL/COM Redirection on Windows.

    既然SxS assembly那么好, 那我们怎么自己建一个呢? 这是一个相当相当麻烦的过程.... 我都懒的看了.
Guidelines for Creating Side-by-side Assemblies
Installing Side-by-side Assemblies


曾经的这一天...



评论 / 个人网页 / 扔小纸条
* 昵称

已经注册过? 请登录

新用户请先注册 以便能显示头像及追踪评论回复

Email
网址
* 评论
表情
 


 

分类小组论坛
杂谈 , 娱乐、八卦 , 文学、艺术 , 体育 , 旅游、同城 , 象牙塔 , 情感 , 时尚、生活 , 星座 , 科技

请注意遵守中华人民共和国法律法规, 如威胁到本站生存, 将依法向有关部门报告, 同时本站的相关记录可能成为对您不利的证据.

相关法律法规
全国人大常委会关于维护互联网安全的决定
中华人民共和国计算机信息系统安全保护条例
中华人民共和国计算机信息网络国际联网管理暂行规定
计算机信息网络国际联网安全保护管理办法
计算机信息系统国际联网保密管理规定