84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
我尝试在linux下编译别人写好的c++文件包,它的目录结构是这样的。
其中c++文件全部放在src里面。hpp文件全部放在include里面
当我用下面的命令去编译它的时候,发现他报如下的错误我应该执行怎样的命令才能使它两个文件的内容都编译到?
业精于勤,荒于嬉;行成于思,毁于随。
-ISet the include path. -I设置include路径。
-I
例如src和include同级,你在src目录下编译,加-I "../include"
-I "../include"
Just add the relevant paths to cmake
Write a Makefile directly. Isn’t compilation much more convenient? ! !
-I
Set the include path.-I
设置include路径。例如src和include同级,你在src目录下编译,加
For example, if src and include are at the same level, you compile in the src directory and add-I "../include"
-I "../include"
. Then you find that there are more dependencies, so you keep adding them. 🎜Just add the relevant paths to cmake
Write a Makefile directly. Isn’t compilation much more convenient? ! !