scons

Does scons support subversion checkout?

我们两清 提交于 2020-01-15 05:21:10
问题 From some sites it seems Scons support subversion checkout: env = Environment() env.SourceCode('.', env.Subversion('XXX')) env.Program('hello.c') http://www.scons.org/doc/0.92/HTML/scons-user/x1625.html But from the man page/user guide of the latest stable version(2.0.0) there is no subversion. It's not mentioned in the change log. So I am wondering what is going on. 回答1: From the looks of things, SourceCode has been deprecated in 2.0. There has been very little discussion about the

Calling a C++ function from a C program

南楼画角 提交于 2020-01-14 04:42:08
问题 How can I call a C++ function from a C program, is it possible?, and if it is how can I do it?. Thank you. 回答1: If you are trying to call a C++ function from C, then you are probably running into name mangling issues. The compiler does this in order to support function overloading and other features of C++. You can use extern "C" to inform the C++ compiler that the function CMACInit() will be called from C code: extern "C" CMACInit() { ... } When declared in this way, the C++ compiler will

How to build windows xp application using Visual studio command line + SCons?

末鹿安然 提交于 2020-01-13 09:12:28
问题 Building a windows xp application using Visual Studio 2015 IDE isn't hard at all, you just need to use the right platform toolset (v120_xp or v140_xp) and just make sure you install the proper redistributable visual studio runtime dlls on the target machine, easy peasy. Now, I've been trying to figure out how to build a windows xp application targetting windows xp without using the VS GUI but using VS2015 command line + SCons All the SCons flags are docummented here but I don't see anything

SCons super slow startup in windows

喜夏-厌秋 提交于 2020-01-05 21:11:33
问题 I have since long suffered from long startup times when building with SCons. On my old work laptop, it could take up to 60 seconds to just build the most fundamental hello world-example. I just received a new laptop, so I had the opportunity to investigate this further. Our laptops come preloaded with Visual Studio 2010 and some other stuff. I also need Visual Studio 2015. On the newly unpacked PC, a build of hello world took "only" 10 seconds (python 2.7.14, scons 3.0.0, no other major

SCons: directory dependency in a parallel build

戏子无情 提交于 2020-01-05 15:16:04
问题 I'm having trouble with a directory dependency in a parallel build in SCons. Consider two projects with a single SConstruct in the following (simplified) hierarchy: - SConstruct - project1 - src - project2 - src - build - project1 - project2 - dist - project1 - project2 Each of project1 and project2 are supposed to be built under the relevant build directory (using variant dir) and several targets needs to be installed under the relevant dist directory. Project 2 depends on Project 1's dist.

SCons: directory dependency in a parallel build

血红的双手。 提交于 2020-01-05 15:15:47
问题 I'm having trouble with a directory dependency in a parallel build in SCons. Consider two projects with a single SConstruct in the following (simplified) hierarchy: - SConstruct - project1 - src - project2 - src - build - project1 - project2 - dist - project1 - project2 Each of project1 and project2 are supposed to be built under the relevant build directory (using variant dir) and several targets needs to be installed under the relevant dist directory. Project 2 depends on Project 1's dist.

When I change SConstruct file, scons doesn't trigger rebuild?

北慕城南 提交于 2020-01-05 06:52:29
问题 First, I've got SConstruct file like this: Object('a.s') Program('mya','a.o') I run scons, it generates 'mya'. OK. Then I change my SConstruct to be: Object('a.s',CCFLAGS='-DHello') Program('mya','a.o') Run scons again. Nothing is done: scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... scons: `.' is up to date. scons: done building targets. This is quite weird to me. When I used make or msbuild systems, whenever there's argumenet change in

Using scons to compile C++ code under windows, scons adds “/Fo” as compile option

瘦欲@ 提交于 2020-01-05 04:28:10
问题 Using the following: Python version 2.7.13, Scons version 2.5.1, Visual Studio 2012 express is installed, but I am not planning to use it. Code blocks and MinGW-W64-builds-4.3 are installed. Using Scons to compile C++ code (networkit toolkit) under windows. Scons adds "/Fo" as compile option. This option works only with VC++ and not with MinGW which I am trying to use. Why does Scons add this flag? I have checked my Sconstruct and the reference build.conf files and cannot seem to find this

SCons: Invoke the build of a Makefile project

假装没事ソ 提交于 2020-01-04 06:22:06
问题 SCons provides env.Command which should theoretically be able to invoke ./configure and make on a Makefile project. However, my understanding is that the Makefile project folder would first have to be copied into SCons' build directory, since the build process should not be changing anything in the source tree. How can this be done? I guess what I'm looking for is something like this: env.Command('lib/moo/Makefile', '', [Copy('BUILD_DIR/lib/moo', 'SOURCE_DIR/lib/moo', 'cd BUILD_DIR/lib/moo',

jsoncpp on vc90?

房东的猫 提交于 2020-01-04 02:39:12
问题 anyone have jsoncpp working on vc90? they use a build system, Scons, which I have never heard of. I installed the latest Scons, found an undocumented scons.bat, launched a vc90 prompt in my jsoncpp dir, modified the SConstruct file to support a msvc90 target (i copied the boilerplate from the msvc80 platform which was already supported) ran scons.bat platform=msvc90 and got errors: scons: done reading SConscript files. scons: Building targets ... cl /Fobuildscons\msvc90\src\jsontestrunner