scons

ValueError: invalid \x escape:

陌路散爱 提交于 2019-12-20 07:39:55
问题 ValueError: invalid \x escape: File "SConstruct", line 49: execfile("hosts.cfg") I'm completely stumped with this one guys... If I print right before line 49, I can see the output. On the very first line of "hosts.cfg" I put a second print statement which is never executed. 回答1: Even on Windows, forward slashes should work for directory names, so you could standardize on those: "libpath" : [".", "../xlib", "../tools", "../info"], Or use raw strings, as @Adam Rosenfield already said in a

ValueError: invalid \x escape:

强颜欢笑 提交于 2019-12-20 07:39:40
问题 ValueError: invalid \x escape: File "SConstruct", line 49: execfile("hosts.cfg") I'm completely stumped with this one guys... If I print right before line 49, I can see the output. On the very first line of "hosts.cfg" I put a second print statement which is never executed. 回答1: Even on Windows, forward slashes should work for directory names, so you could standardize on those: "libpath" : [".", "../xlib", "../tools", "../info"], Or use raw strings, as @Adam Rosenfield already said in a

error at building libjingle on Mac OS X 10.7.2 like “error: string.h: No such file or directory”

烈酒焚心 提交于 2019-12-20 06:09:42
问题 I failed to build libjingle on Mac OS X 10.7.2. The output was the following when I run $path_to_swtoolkit/hammer.sh according to the README of libjingle. MBP17:talk rei25$ ~/Desktop/swtoolkit/hammer.sh scons: Reading SConscript files ... scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead. File "/Users/rei25/Desktop/swtoolkit/site_scons/site_init.py", line 203, in BuildEnvironmentSConscripts scons: done reading SConscript files. scons: Building

scons - always install after build

爱⌒轻易说出口 提交于 2019-12-20 04:19:06
问题 I want scons to always install the built file in several additional directories. I created the usual install builder with alias a shown in user manual and it installs correctly when I use scons install but I prefer it to run automatically after the target is built and I cannot figure out how to specify the dependencies. Target = Program(...) Env.Alias('install', Env.Install(FinalDir, Target)) Should the target depend on install or vice versa or should I use something else? 回答1: Your code

Scons. Go recursive with Glob

谁都会走 提交于 2019-12-19 07:39:10
问题 I using scons for a few days and confused a bit. Why there is no built-in tools for building sources recursively starting from given root? Let me explain: I have such source disposition: src Core folder1 folder2 subfolder2_1 Std folder1 ..and so on. This tree could be rather deeper. Now I build this with such construction: sources = Glob('./builds/Std/*/*.cpp') sources = sources + Glob('./builds/Std/*.cpp') sources = sources + Glob('./builds/Std/*/*/*.cpp') sources = sources + Glob('./builds

Scons. Go recursive with Glob

谁都会走 提交于 2019-12-19 07:39:06
问题 I using scons for a few days and confused a bit. Why there is no built-in tools for building sources recursively starting from given root? Let me explain: I have such source disposition: src Core folder1 folder2 subfolder2_1 Std folder1 ..and so on. This tree could be rather deeper. Now I build this with such construction: sources = Glob('./builds/Std/*/*.cpp') sources = sources + Glob('./builds/Std/*.cpp') sources = sources + Glob('./builds/Std/*/*/*.cpp') sources = sources + Glob('./builds

Why does SCons VariantDir() not put output in the given directory?

不打扰是莪最后的温柔 提交于 2019-12-19 06:08:10
问题 I'm thinking about using SCons for a new project. It looks really good, though I'm finding VariantDir quite confusing. I have a simple project with a handful of C source files in one directory, and I want to build in "normal" and in "profile" mode -- with two different sets of options to gcc. I want the outputs to go in the normal/ and profile/ directories, respectively. For testing, I've cut back to just a single source file, t.c, which has a main() in it. My SConstruct file is in the same

How to force use of static library over shared?

假装没事ソ 提交于 2019-12-18 19:06:26
问题 In my SConscript I have the following line: Program("xtest", Split("main.cpp"), LIBS="mylib fltk Xft Xinerama Xext X11 m") How do I get scons to use mylib.a instead of mylib.so, while linking dynamically with the other libraries? EDIT: Looking to use as few platform specific hacks as possible. 回答1: Passing the full filepath wrapped in a File node will force static linking. For example: lib = File('/usr/lib/libfoo.a') Program('bar', 'main.c', LIBS = [lib]) Will produce the following linker

Prevent SCons from looking for standard tools

半世苍凉 提交于 2019-12-17 16:58:06
问题 I am currently setting up SCons for cross-compilation with Windows as the host OS. I am building a custom Environment for the cross-compiler, but SCons insists on looking for Visual Studio each time I start it up (and prints a warning that it cannot find it, because I don't have it installed). Can I prevent it from looking for standard tools I know I am not going to use? 回答1: There are at least 2 ways to do this, the first way is the easiest, try creating the environment specifying the

Need help debugging slow scons runtime

痴心易碎 提交于 2019-12-14 04:19:20
问题 I am working on two projects using scons to build. One works great, while the other (more complicated) project is very frustrating. Here is what I see when running scons for the second project: S time scons scons: Reading SConscript files ... <<< Generates some code, output seen in console >>> scons: done reading SConscript files. scons: Building targets ... <<< 30+ second delay, with no output >>> <<< Building occurs, with output, only 2-3 seconds >>> scons: done building targets. <<< 15-20