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")