[英]fatal error C1083: Cannot open include file: 'vld.h': No such file or directory
all, i tried to use Visual Leak Detector, and followed the instructions: 所有,我尝试使用Visual Leak Detector,并按照说明进行操作:
Visual C++ 2010: Go to View ->Property Manager, select Microsoft.Cpp.Win32.user. Visual C ++ 2010:转到“视图”->“属性管理器”,选择“ Microsoft.Cpp.Win32.user”。 Select VC++ Directories and then "Include files" from the tree.
选择VC ++目录,然后从树中选择“包含文件”。 Add the include subdirectory from the Visual Leak Detector installation directory.
从Visual Leak Detector安装目录中添加include子目录。 Move it to the bottom of the list.
将其移到列表的底部。 Then select "Library files" from the drop-down menu and add the lib\\Win32 subdirectory from the Visual Leak Detector installation directory.
然后从下拉菜单中选择“库文件”,然后从Visual Leak Detector安装目录中添加lib \\ Win32子目录。 Again, move it to the bottom of the list.
再次将其移至列表底部。 Repeat for Microsoft.Cpp.x64.user, but select lib\\Win64 subdirectory instead.
对Microsoft.Cpp.x64.user重复上述步骤,但是选择lib \\ Win64子目录。
and include in one of my source file, and got the error c1083, so whats going on? 并包含在我的源文件之一中,并显示错误c1083,那么怎么回事?
this is what i entered: 这是我输入的内容:
C:\\Program Files\\Visual Leak Detector\\lib\\Win32;$(IncludePath) C:\\ Program Files \\ Visual Leak Detector \\ lib \\ Win32; $(IncludePath)
for Microsoft.Cpp.Win32.user 对于Microsoft.Cpp.Win32.user
C:\\Program Files\\Visual Leak Detector\\lib\\Win64;$(IncludePath) C:\\ Program Files \\ Visual Leak Detector \\ lib \\ Win64; $(IncludePath)
for Microsoft.Cpp.X64.user 对于Microsoft.Cpp.X64.user
cheers 干杯
daiyue 岱岳
In the "Include Directories" field, add C:\\Program Files\\Visual Leak Detector\\include;$(IncludePath)
and in the "Library Directories" field type C:\\Program Files\\Visual Leak Detector\\lib\\Win32
. 在“包含目录”字段中,添加
C:\\Program Files\\Visual Leak Detector\\include;$(IncludePath)
然后在“库目录”字段中键入C:\\Program Files\\Visual Leak Detector\\lib\\Win32
。 (or \\Win64, like in the instructions you have followed). (或\\ Win64,如您所遵循的说明中所述)。
Note that this setup will get you through the build phase, if the paths are correct. 请注意,如果路径正确,此设置将使您进入构建阶段。 At run time, your executable must find Visual Leak Detector's dll(s) so you could either prepend the
C:\\Program Files\\Visual Leak Detector\\bin
(or the name of the subdirectory containing the binary files - dll and exe) to the "Executable directories" field, or add the C:\\Program Files\\Visual Leak Detector\\bin
directory to the PATH environment variable, this way your executable will start by simply launching it from Explorer (not only from Visual Studio). 在运行时,您的可执行文件必须找到Visual Leak Detector的dll,以便您可以将
C:\\Program Files\\Visual Leak Detector\\bin
(或包含二进制文件的子目录的名称-dll和exe)添加到目录中。在“可执行目录”字段中,或将C:\\Program Files\\Visual Leak Detector\\bin
目录添加到PATH环境变量中,这样,您的可执行文件将通过简单地从资源管理器(不仅是从Visual Studio)启动它来启动。
As a third option, you could copy the DLLs from VLD in the same directory as your executable. 第三种选择是,您可以从VLD复制DLL到与可执行文件相同的目录中。
Put double quotes around paths that contain an embedded space. 在包含嵌入式空间的路径两边加上双引号。 And watch out for the difference between
c:\\program files
and c:\\program files (x86)
on a 64 bit operating system. 并注意64位操作系统上
c:\\program files
和c:\\program files (x86)
之间的区别。
It appears that you haven't specified the include path, that is "C:\\Program Files\\Visual Leak Detector\\include" or similar. 似乎您没有指定包含路径,即“ C:\\ Program Files \\ Visual Leak Detector \\ include”或类似路径。 And I'm not sure about appending $(IncludePath) to the library paths.
而且我不确定要将$(IncludePath)附加到库路径。
Visual C++ 2010: Go to View ->Property Manager, select Microsoft.Cpp.Win32.user.
Visual C ++ 2010:转到“视图”->“属性管理器”,选择“ Microsoft.Cpp.Win32.user”。 Select VC++ Directories and then "Include files" from the tree.
选择VC ++目录,然后从树中选择“包含文件”。 Add the include subdirectory from the Visual Leak Detector installation directory.
从Visual Leak Detector安装目录中添加include子目录。
The idea is that you must instruct the ide where to look for the files you reference in your project (.lib and .h/.hpp/.hxx/etc). 这个想法是,您必须指示ide在项目中查找要引用的文件(.lib和.h / .hpp / .hxx / etc)的位置。 If this doesn't work, please provide more details about each field you entered or maybe some screenshots.
如果这不起作用,请提供有关您输入的每个字段的更多详细信息,或者提供一些屏幕截图。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.