Question

I have a project which has been checked out of Subversion and uses Scons for building. However, I have a library installed on my computer which Scons doesn't detect - it just says that the include file can't be found. Is there any way that I can direct Scons to the library location without altering the Sconscript file at all (because I don't want to have to deal with conflicts every time I update) - e.g. add a command line option that it will detect before searching for the include file? I can't even see all the available options because it doesn't respond to the --help option before it searches for the include files.

Was it helpful?

Solution

Okay, after some more googling, I found that there is a way to do it. gcc has a number of default directories that it searches (which I already knew - I just didn't know what they were defined as). The simplest way to do what I was after is to add the directories to these environment variables. The one that I needed was

$CPATH

This sets the path where gcc searches for its include files. Setting this to the directory I needed solved my problem.

OTHER TIPS

you can set env["CPPPATH"], but I hope there's an easier way...

SCons has a concept of repositories - directories to look for source and target files. These can be specified on command line.

-Y REPOSITORY, --repository=REPOSITORY, --srcdir=REPOSITORY
                            Search REPOSITORY for source and target files.

To get to help of SCons itself, use -H option.

no you can't, unless the developer of the scons script explicitly adds support for it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top