相关疑难解决方法(0)

SCons问题 - 不了解Variables类

我正在为一个项目开发一个SConstruct构建文件,我正在尝试从Options更新为Variables,因为Options已被弃用.我不明白如何使用变量.我有0 python经验,这可能有助于此.

例如,我有这个:

opts = Variables()
opts.Add('fcgi',0)
print opts['fcgi']
Run Code Online (Sandbox Code Playgroud)

但是我收到一个错误:

AttributeError: Variables instance has no attribute '__getitem__':
Run Code Online (Sandbox Code Playgroud)

不知道这应该如何工作

python variables scons

3
推荐指数
1
解决办法
1565
查看次数

SCons - 非标准位置的标题/库

我正在尝试使用SCons编译一个程序,该程序需要一组依赖项,我已经安装在非标准位置.

我在/ home/dja/ocr中安装了依赖项.现在我正在尝试编译主程序,无法弄清楚如何告诉SCons在哪里查找库和头文件.

我试过(除其他外):

scons prefix=/home/dja/ocr

scons includepath=/home/dja/ocr/include libpath=/home/dja/ocr/lib

env LIBPATH=/home/dja/ocr/lib INCLUDEPATH=/home/dja/ocr/include scons

...etc...
Run Code Online (Sandbox Code Playgroud)

结果总是一样的:

scons: Reading SConscript files ...  
Currently supported OS version: Ubuntu 10.04  
Checking for C++ library iulib... no  
AssertionError: :  
  File "/home/dja/ocr/src/ocropus/SConstruct", line 107:  
    assert conf.CheckLibWithHeader("iulib","iulib/iulib.h","C++");  
Run Code Online (Sandbox Code Playgroud)

我无法在Google上找到答案.

什么是正确的SCons foo才能让它工作?

scons building

3
推荐指数
1
解决办法
6310
查看次数

标签 统计

scons ×2

building ×1

python ×1

variables ×1