0
我想编译一个简单的C++程序,但包含文件没有被添加到编译命令。scons包含目录不工作
下面是代码
#include <stdlib.h>
#include "GLES2/gl2.h"
int main()
{
return 0;
}
SConstruct
env = Environment()
cpp_path = '''
.
include
'''
env.Append(CPPPATH = Split(cpp_path))
Program('test_gcc_scons.c')
scons的输出
scons的:读SConscript文件... scons的:读完SConscript文件。 scons的:建筑的目标... 的gcc -o test_gcc_scons.o -c test_gcc_scons.c test_gcc_scons.c:2:23:致命错误:GLES2/gl2.h:没有这样的文件或目录
目录
[email protected] ~/projects/test_gcc_scons $ ls include/GLES2/
gl2ext.h gl2.h gl2platform.h
编辑:发现问题。不得不这样做
env.Program("test_gcc_scons.c")