无法解析gcc中的头文件路径

时间:2014-05-24 13:59:41

标签: gcc makefile

这里我在使用gcc编译时遇到解决路径的问题。 这里我有波纹管文件夹结构:
算法有两个文件夹

算法---

APP
LinkedList

LinkedList having two folder: header and source    
Now in /Algorithm/LinkedList/header has LinkedList.h file    
And in /Algorithm/LinkedList/source has LinkedList.c file.    
In /Algorithm/App I have AppMain.c    
In AppMain.c I am doing    

#include"LinkedList.h"

当我尝试使用bellow命令编译LinkedList.c时,它正在执行:

gcc -I LinkedList/header LinkedList/source/LinkedList.c -c    

正在编译并生成LinkedList.o文件 但是当尝试以与下面相同的方式编译AppMain.c时,它给出了我作为LinkedList.h的错误:没有这样的文件或目录。

gcc -I LinkedList/header App/AppMain.c -c    

请帮我解决这个问题。

0 个答案:

没有答案
相关问题