Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 在eclipse中包含外部makefile的多个子目录_C++_Eclipse_Makefile - Fatal编程技术网

C++ 在eclipse中包含外部makefile的多个子目录

C++ 在eclipse中包含外部makefile的多个子目录,c++,eclipse,makefile,C++,Eclipse,Makefile,我是调试CDT Eclipse中C++项目的Tyrun。我的项目结构是: *Parent directory| | ----- SubDir 1 | | | | | | | | | --- *.h an

我是调试CDT Eclipse中C++项目的Tyrun。我的项目结构是:

*Parent directory|
                |
                ----- SubDir 1
                |        |   
                |        |
                |        |
                |        |
                |       --- *.h and *.cpp  (header files and c++ source code)
                |       
                |
                |
                ----- SubDir 2
                        |
                        |
                        |
                        --- *.h and *.cpp  (header files and c+= source code)*
目前我有一个shell脚本,它编译所有内容并生成一个可执行文件。这个shell脚本有以下命令。它可以通过命令行正常工作

g++ -I SubDir1 -I SubDir2 Main.cpp SubDir1/*.cpp SubDir2/*.cpp -o exec

但是,
-I
在某种程度上无法与eclipse一起工作。是否有一种方法可以实现此eclipse。如何在外部或目标makefile中包含多个子目录。

在eclipse中创建C/C++项目时使用了哪个模板。它是可执行的、makefile还是autotools项目?显示makefile内容。你得到了什么错误?我可能错了,但我认为-I和目录之间不允许有空格。