C++ 在eclipse中包含外部makefile的多个子目录
我是调试CDT Eclipse中C++项目的Tyrun。我的项目结构是:C++ 在eclipse中包含外部makefile的多个子目录,c++,eclipse,makefile,C++,Eclipse,Makefile,我是调试CDT Eclipse中C++项目的Tyrun。我的项目结构是: *Parent directory| | ----- SubDir 1 | | | | | | | | | --- *.h an
*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和目录之间不允许有空格。