Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/124.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++ 有没有办法通过gnu make在子目录中编译源代码_C++_Makefile - Fatal编程技术网

C++ 有没有办法通过gnu make在子目录中编译源代码

C++ 有没有办法通过gnu make在子目录中编译源代码,c++,makefile,C++,Makefile,我正在尝试编写Makefile脚本,它将在包含子目录的VS代码中编译我的项目。我的项目结构如下所示: src | - subdirectory1 | | - file1.cpp | | - file2.cpp | - subdirectory2 | | - sub3 | | | - file4.cpp 你试了什么?它是如何失败的?Makefile脚本可以与子目录中的源文件一起使用。是的,这当然是可能的。@rustyx如果你的评论是一个答案,我一定会投票让它成为一个被接受的答

我正在尝试编写Makefile脚本,它将在包含子目录的VS代码中编译我的项目。我的项目结构如下所示:

src
| - subdirectory1
|   | - file1.cpp
|   | - file2.cpp
| - subdirectory2
|   | - sub3
|   |   | - file4.cpp

你试了什么?它是如何失败的?Makefile脚本可以与子目录中的源文件一起使用。是的,这当然是可能的。@rustyx如果你的评论是一个答案,我一定会投票让它成为一个被接受的答案。