scons

With scons, how do you link to prebuilt libraries?

I recently started using scons to build several small cross-platform projects. One of these projects needs to link against pre-built static libraries... how is this done? In make, I'd just append "link /LIBPATH:wherever libstxxl.lib" on windows, and "stxxl.a" on unix. ...

fatal error C1083: Cannot open include file: 'Windows.h': and scons

Hi, today is officially my first day with C++ :P I've downloaded Visual C++ 2005 express edition and Microsoft Platform SDK for Windows Server 2003 SP1 because I want to put my hands on open source Enso ( http : // code.google.com/p/enso ) . So, after installing scons I went to the console and try to compile it using scons but I go...

load dll from python

Hello. I'm building a python application from some source code I've found Here I've managed to compile and fix some problems by searching the web, but I'm stuck at this point: When running the application this message appears. This python app, usues swig to link to c/c++ code. I have VC++2005 express edition which I used to compi...

Detecting CPU architecture (32bit / 64bit ) in scons?

Are there any 'standard' plugins for detecting the CPU architecture in scons? BTW, this question was asked already here in a more general form... just wondering if anyone has already taken the time to incorporate this information into scons. ...

How do I get projects to place their build output into the same directory with Scons?

Background I'm trying out Scons by setting up a basic C++ sample project that has two sub-projects: Prj1 is an EXE that depends on Prj2 Prj2 is a DLL that exports some functions The problem I'm running into is that the library builds its .obj, .pdb, .lib, .dll, etc. files in the same directory as it's SConscript file while the EXE ...

How to create an alias for a build target with a relative path in Scons?

Background I'm trying out Scons by setting up a basic C++ sample project that has two sub-projects: Prj1 is an EXE that depends on Prj2 Prj2 is a DLL that exports some functions You can see the directory structure and the contents of my SConstruct and SConscript files here Problem The problem I'm running into is that in order to b...

scons : src and include dirs

can someone give a scons config file which allows the following structure toplevel/ /src - .cc files /include .h files at top level I want the o and final exe. ...

scons: How can I create a link to another repository's target if the target is built in the other repository

When I add a "Repository" to a SConstruct file (link), if any target in my repository has been built in this other repository ( and the dependencies haven't changed), then SCons will not build the target -- which is really cool. Unfortunately, I have some tools which rely on the targets being placed in a certain location. How can I cr...

SCons problem - dont understand Variables class

I'm working on an SConstruct build file for a project and I'm trying to update from Options to Variables, since Options is being deprecated. I don't understand how to use Variables though. I have 0 python experience which is probably contributing to this. For example, I have this: opts = Variables() opts.Add('fcgi',0) print opts['fcgi'...

How can I generate multi-line build commands?

In SCons, my command generators create ridiculously long command lines. I'd like to be able to split these commands across multiple lines for readability in the build log. e.g. I have a SConscipt like: import os # create dependency def my_cmd_generator(source, target, env, for_signature): return r'''echo its a small world after ...

Calling a C++ function from a C program

Hello, 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. ...

Are there any libraries/frameworks for SCons?

Each project using SCons seems to be reinventing the wheel. I would be glad to take someones directory layout, and/or solution for variant builds(debug/release), and/or testing framework, and/or best practices. Even several not-too-simple examples would help. ...

Possible to spit out Directed Acyclic Graph from Scons?

Is there a way to get scons to output the directed acyclic graph that it internally generates? In a graphviz format perhaps? ...

Best build system for embedded development/cross-compiling

I'm doing some development right now using dsPICs and I'm not exactly in love with MPLAB. I'm actually using Visual Studio with a makefile project. Currently I'm using SCons, which seems to work fairly well, after finding a helpful guide to setting up to use an alternate compiler. Still, I can't help but wonder, is there a better build ...

In scons, how can I inject a target to be built?

I want to inject a "Cleanup" target which depends on a number of other targets finishing before it goes off and gzip's some log files. It's important that I not gzip early as this can cause some of the tools to fail. How can I inject a cleanup target for Scons to execute? e.g. I have targets foo and bar. I want to inject a new custo...

How to I get scons to invoke an external script?

I'm trying to use scons to build a latex document. In particular, I want to get scons to invoke a python program that generates a file containing a table that is \input{} into the main document. I've looked over the scons documentation but it is not immediately clear to me what I need to do. What I wish to achieve is essentially what yo...

How to make SCons update installed files inside a directory that have changed?

I'm doing: data = env.InstallAs('$PREFIX/share/odysi', 'data') env.Alias('install', data) Which works fine the first time. But if I change something inside the 'data' folder and do scons -Q install again, it says `install' is up to date. even though a file has changed and needs to be reinstalled. There are a lot of files in the dire...

env.Clone() in scons doesn't do a deep-copy.

In a SCons script I create a base environment from which I derived others environments. Something like this : base = Environment() base['CXXFLAGS'] += ['-DBOOST_HAS_PTHREAD', '-D__STDC_CONSTANT_MACROS', '-DFILELOG_MAX_LEVEL=4', '-Wall'] opt = base.Clone() opt['CXXFLAGS'] += ['-DNDEBUG', '-O3'] This way, I can create more environment ...

How do I constrain the SCons Command builder to run only if its dependencies have changed?

I am using the Command builder in scons to specify that a particular script needs to be invoked to produce a particular file. I would like to only run the script if it has been modified since the file was previously generated. The default behaviour of the Command builder seems to be to always run the script. How can I change this? Th...

unit test build files

What are the best policies for unit testing build files? The reason I ask is my company produces highly reliable embedded devices. Software patches are just not an option, as they cost our customers thousands to distribute. Because of this we have very strict code quality procedures(unit tests, code reviews, tracability, etc). Those ...