不是很明白这两个区别我自己定义的头文件,为什么在对应的源程序里使用,不行啊。#include <MyApp.h>说找不到此文件。可这个文件明明在工程里啊。而且跟源程序.c文件在同一个文件夹中啊有没有详细介绍include的文档?
解决方案 »
- TCP数据包到达顺序?
- 关于视图分割的问题
- (SOS)电脑左下角开始菜单看不到"重新启动和关机"选项(在线等)
- 真的没分了,TCP方式如何获得MPEG4的RTP桢数据
- GDI+的系统要求
- 急救!!!正在用MFC写的程序中,某按钮控件单击消息突然不响应此按钮的单击动作了!!!???
- 关于skinmagic静态连接的问题!!!
- 这是为什么?
- 我的对话框颜色怎么被背景窗体颜色覆盖了?
- 请问,请问这样一个问题,用MFC和用C++在同一个功能的实现上的问题。
- 比如拷贝CopyFile()一个大文件,时间较长,而下面的代码是对这个文件进行处理.我如何等待Copy成功?
- CString str; str.Formate("%f",num)后出错!其中num为float型
而Include <> 相反先从系统目录,后从本地目录
你的问题应该还是路径的问题,检查下工程设置里面的引入路径
检查下工程设置里面的引入路径
=======
哪里看“引入路径”???
""
This form instructs the preprocessor to look for include files in the same directory of the file that contains the #include statement, and then in the directories of any files that include (#include) that file. The preprocessor then searches along the path specified by the /I compiler option, then along paths specified by the INCLUDE environment variable. <>
This form instructs the preprocessor to search for include files first along the path specified by the /I compiler option, then, when compiling from the command line, along the path specified by the INCLUDE environment variable.
以后用自己定义的头文件要用"".用VCStudio的头文件要用<>...
里面的制定你的include路径,lib路径
vc.net也差不多
在看看你的工程设置是否有引入错误的路径
#include ""引用的是自定义头文件,所以你只要把<>改为""就可以了
而abc.h里又有一个#include <efg.h>.这里,abc.h 是别人提供的标准的文件,不能修改如果我仅仅在我的文件里把<> 改为 ""
那等编译到abc.h里的#include <efg.h>时,还是说找不到。如果不使用 “vc6 下面的菜单tools-〉option-〉drictroy” 这个方法,还有其他方法没有?
因为我看到有的程序不需要这样设置的。但可以编译通过。
如果我们只想在某个工程中添加头文件目录(不影响其他工程)的话,应该在Project->Settings->C/C++一栏的Additional include directories:编辑框中添加绝对或相对目录就好了。
include <> VC安装的库的目录
我用的是VC6.0