Meenakshi
Meenakshi

Reputation: 1

While using scons with c code on cygwin gcc, object has no attribute 'program'

From below SContruct file while executing with Scons 2.5, below error is shown: $ /cygdrive/c/Python27/Scripts/scons.bat scons: Reading SConscript files ... Windows

scons: warning: No version of Visual Studio compiler found - C/C++ compilers t likely not set correctly File "C:\cygwin\lib\python2.5\scons-2.5.1\SConstruct", line 18, in AttributeError: 'SConsEnvironment' object has no attribute 'program': File "C:\cygwin\lib\python2.5\scons-2.5.1\SConstruct", line 19: env.program('mee.c')

SConstruct has:

    `import os
     import platform
     print platform.system()
     DefaultEnvironment(tools = [])
     env = DefaultEnvironment()
     print env
     env = Environment(tools = ['default', 'gcc'])
     env.program('mee.c')
     `

Upvotes: 0

Views: 515

Answers (1)

dirkbaechle
dirkbaechle

Reputation: 4052

The error message is correct, there is no method named program() available for a build environment. Try

env.Program(...)

instead (note the capital P) and also consult our UserGuide, please.

Upvotes: 1

Related Questions