我正在尝试编写一个使用函数 nanosleep() 的模块。
当我的 make 文件运行时,它会通过以下方式更改构建库: make -C/lib/modules/2.6.18-128.4.1.el5/build M=/workspace/lcd-winstar-0.0.1 modules
nanosleep 在/usr/include 中声明,所以我的 makefile 找不到它。 我应该将哪些行添加到我的 makefile 中以包含此位置?????
谢谢
最佳答案
-I dir
Add the directory dir to the list of directories to be searched for header files. Directories named by -I are searched before the standard system include directories. If the directory dir is a standard system include directory, the option is ignored to ensure that the default search order for system directories and the special treatment of system headers are not defeated .
&&
-Ldir Add directory dir to the list of directories to be searched for -l
关于c - Makefile - 包含库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4479161/