要变通解决此问题,添加 /IGNOREIDL 链接器选项。 在 Visual Studio.net IDE 中设置此链接器选项,请按照下列步骤操作:
- 打开项目的 属性页
对话框。
- 展开 链接器
文件夹。
- 单击 嵌入的 IDL
查看嵌入的 IDL 属性页。
- 将 忽略嵌入的 IDL
属性设置为 是
。
Compiler Warning (level 1) C4772
#import referenced a type from a missing type library; 'missing_type' used as a placeholder
A type library was referenced with the #import
directive. However, the type library contained a reference to another type library that was not referenced with #import
. This other .tlb file was not found by the compiler.
Note that the compiler will not find type libraries in different directories if you use the /I (Additional Include Directories)
compiler option to specify those directories. If you want the compiler
to find type libraries in different directories, add those directories
to the PATH environment variable.
This warning is, by default, issued as an error. C4772 can not be suppressed with /W0.
This is the first type library needed to reproduce C4772.
// c4772a.idl
[uuid("f87070ba-c6d9-405c-a8e4-8cd9ca25c12b")]
library C4772aLib
{
[uuid("f87070ba-c6d9-405c-a8e4-8cd9ca25c100")]
enum E_C4772a
{
one, two, three
};
};
This is the second type library needed to reproduce C4772.
// c4772b.idl
// post-build command: del /f C4772a.tlb
// C4772a.tlb is available when c4772b.tlb is built
[uuid("f87070ba-c6d9-405c-a8e4-8cd9ca25c12d")]
library C4772bLib
{
importlib ("c4772a.tlb");
[uuid("f87070ba-c6d9-405c-a8e4-8cd9ca25c12e")]
struct S_C4772b
{
enum E_C4772a e;
};
};
The following sample generates C4772:
// C4772.cpp
// assumes that C4772a.tlb is not available to the compiler
// #import "C4772a.tlb"
#import "C4772b.tlb" // C4772 uncomment previous line to resolve
// and make sure c4772a.tlb is on disk
分享到:
相关推荐
每次编译链接的时候都会出现LNK1000,Increment linker已停止工作的问题,刚开始的时候只是简单的在开发环境里设置了一下不启用增量链接,后来一个工具完成之后在网上搜了一下,发现这是微软的一个BUG,需要下载安装...
完美解决VS2003.Net fatal error LNK1201: 写入程序数据库“.pdb”时出错 文末给出一个完美的解决方案和一个懒人补丁包。问题描述如下:在重新编译的时候,经常报错: fatal error LNK1201: 写入程序数据库“.pdb”...
用于创建或修改现有LNK的C#项目LNKMod输出文件名如果使用-modify,将更新您指定的.LNK如果使用-create用法/测试用例,则将创建payload.lnk。修改(将在当前目录中修改.LNK,仅放置一个! )修改可执行文件的路径,...
ShellLink一个.NET类库,用于处理MS-SHLLINK中记录的ShellLink(LNK)文件。 它允许读取,创建和修改ShellLink(LNK)文件。 请注意,该类库取决于PropertyStore类库ShellLink。一个用于处理ShellLink(LNK)文件的...
vs2008-vc LNK2019,请高手指点
阐述了C++中vc中error LNK2001 resolved external symbol _WinMain@16的解决方法的解决方法。
3Wled驱动电源方案LNK303P 3Wled驱动电源方案LNK303P
对于编程人员在编译程序的时候经常会遇到error LNK1120和error lnk2001这问题,跟大家分享一下自己找到的资料,以及自己遇到的问题,希望对大家有帮助。
Protel99SE与win7win10加库问题的解决方案.pdf
解决LNK2005学习笔记.docx
解决安装vs2012后vs2010 LINK : fatal error LNK1123: failure during conversion to COFF Wrong version: 03/18/2010 01:16 PM 31,048 cvtres.exe Correct version: 02/21/2011 06:03 PM 31,056 cvtres.exe
解决报错Error LNK2001:unresolved external symbol
解决error LNK2001: unresolved external symbol
VC6.0打开文件出现错误解决方案,压缩包内含有解决方案的文档及所需要的文档
解决error LNK2001 无法解析的外部符号 int __cdecl sprintf
解决报错LINK : fatal error LNK1000补丁 返回错误:LINK : fatal error LNK1000: Internal error during IncrBuildImage
在textbox1中输入快捷方式lnk文件路径,点击按钮,textbox2中将显示该快捷方式指向的文件路径
LNK 306 documents for SMPS
解决error LNK2005 void __cdecl operator delete(void