今天安装编译了Osg,在编译debug版本是没有问题,可改为realse版本是出现上述问题,在网上查了一下。
1,在项目属性——配置属性——链接器——清单文件中, 把生成清单改成否就行了。
2,经过进一步的探索,发现在项目属性——配置属性——清单工具——输入和输出中,把嵌入清单改成否也行。
3,如果编译前将所有打开的与该项目有关的文件都关掉,也可以解决问题。
根本原因: 由于VC需要把生成的文件中嵌入MANIFEST文件,而由于杀毒软件之类的会握有这个文件句柄(因为杀毒软件
发现这个EXE,DLL正在读写),于是VC就写不进去了,方法是暂时关闭杀毒软件,这样就不用改写MANIFECT。
Hi,
This might be due to antivirus holding open handle on the exe generated and thus when VS tries to embed the manifest it fails with access denied.
Is Antivirus running on your machine? Does this repro with Antivirus turned off?
If above is not the case can you provide us with a repro.
Thanks,
VC++ Team