我链接时出现错误MyWindow.obj : error LNK2022: 元数据操作失败(8013118D) : 重复类型(__POSITION)中的布局信息不一致:(0x02000074)。
LINK : fatal error LNK1255: 由于元数据错误,链接失败我看到外国论坛上也有人和我一样的问题
那个人是这样问的:First, thanks for the update.Second, when trying to compile a .net project (e.g a brand new .net
console or library project) that has <windows.h> included i get many
linker errors like the one below:MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c000002).
[...]
LINK : fatal error LNK1255: link failed because of metadata errors
Any idea how to fix this?Thanks
然后有人回答
It took a little bit to track this down, but we did it. This is caused
because we moved the NativeEnumAttribute from Microsoft.VisualC.dll to
another assembly. The managed CRT has a few enums (probably from windows.h)
that have the old location, while your code has the new location. (I
personally think the Attribute shouldn't even be there).Anyways, this is fixed by building with a newer msvcmrt.lib or msvcmrtd.lib.
We will package that and provide it with the next refresh. We'll try to get
that done next week.I'm sorry for the inconvenience.
什么意思?
LINK : fatal error LNK1255: 由于元数据错误,链接失败我看到外国论坛上也有人和我一样的问题
那个人是这样问的:First, thanks for the update.Second, when trying to compile a .net project (e.g a brand new .net
console or library project) that has <windows.h> included i get many
linker errors like the one below:MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c000002).
[...]
LINK : fatal error LNK1255: link failed because of metadata errors
Any idea how to fix this?Thanks
然后有人回答
It took a little bit to track this down, but we did it. This is caused
because we moved the NativeEnumAttribute from Microsoft.VisualC.dll to
another assembly. The managed CRT has a few enums (probably from windows.h)
that have the old location, while your code has the new location. (I
personally think the Attribute shouldn't even be there).Anyways, this is fixed by building with a newer msvcmrt.lib or msvcmrtd.lib.
We will package that and provide it with the next refresh. We'll try to get
that done next week.I'm sorry for the inconvenience.
什么意思?
可能是其他的问题
我看这个好像是M$给出的回复吧?你似乎需要通过安装VS的更新来解决这个问题……
我在MFC里面用了DirectShow 采集视频
大体框架是这样
class MyFrame : public CFrameWnd
{
public:
Capture();
}
在MyFrame的Capture()函数里面进行了视频采集