[CLAM] Problem with compiling simple examples with scons

David García Garzón dgarcia at iua.upf.edu
Tue Nov 11 08:09:36 PST 2008

You solved the first problem in the right way. If you don't have Qt and you 
are not planning to use it, just comment the related lines.

Regarding the second problem, sconstruct expects a 'main.cxx' file to be in 
the current folder. You can change that at the line where the mainSources 
variable is defined.


On Dimarts 11 Novembre 2008, eparzy at aol.com wrote:
> Hi!
> I have a little problem with compiling the code examples that are in the
> wiki... I am new with using mingw and scons; I could compile the clam
> library itself, but now I want to compile these code examples to get
> familiar with the (I will need to make my own classes for my project).
> I tried with the first example
> (http://clam.iua.upf.edu/wikis/clam/index.php/Constructing_and_playing_a_si
>mple_network), using the given sconstruct file
> (http://clam.iua.upf.edu/wikis/clam/index.php/Minimal_SConstruct_to_build_w
> I try to compile it by typing that in the console in the directory where i
> have the sconstruct and main.cxx files: $ scons
> clam_prefix='c:/mingw/local'
> I get these errors:
> TypeError: exceptions must be classes or instances, not str:
> ? File "D:\medialogy\med7\project\prog\SConstruct", line 23:
> ??? env.Tool('qt4', toolpath=[clam_sconstoolspath])
> ? File "c:\Python26\Lib\site-packages\scons-1.1.0\SCons\Environment.py",
> line 1632: ??? tool(self)
> ? File "c:\Python26\Lib\site-packages\scons-1.1.0\SCons\Tool\__init__.py",
> line 181: ??? apply(self.generate, ( env, ) + args, kw)
> ? File "C:\mingw\local\share\clam\sconstools\qt4.py", line 258:
> ??? QT4_LUPDATE = locateQt4Command(env,'lupdate', env['QTDIR']),
> ? File "C:\mingw\local\share\clam\sconstools\qt4.py", line 238:
> ??? raise "Qt4 command '" + command + "' not found. Tried: " + ',
> '.join(triedPaths)
> I then tried commenting env.Tool('qt4', toolpath=[clam_sconstoolspath]) and
> the lines in the env.EnableQt4Modules call (I don't plan to use Qt classes
> later on). . Trying to compile with the same console command as before, I
> get: ValueError: list.remove(x): x not in list:
> ? File "D:\medialogy\med7\project\prog\SConstruct", line 60:
> ??? sources.remove(mainSource)
> So in this case it seems that it's not even finding the main file...
> Can somebody give me a hint about what's going wrong? It might be something
> trivial, as I said before I am really not used to scons and python
> scripting...
> Thanks a lot in advance for help!
> Emmanuel

David García Garzón
(Work) dgarcia at iua dot upf anotherdot es

More information about the clam-users mailing list