Sublime Forum

Using scons on mac with Sublime

#1

Good Day

I try to make sublime work with my custom scons building file but without success.

My scons I have written is:

Program('monster_program',Glob("*.cpp"))

and my build file is this:

[code]{
“cmd”: “scons”, “monster_program”, “$file”],
“file_regex”: “^(…^:]):([0-9]+):?([0-9]+)?:? (.)$”,
“working_dir”: “${project_path:${folder:${file_path}}}”,

“variants”:

  {
     "name": "Clean",
     "cmd": "scons", "-c"]
  }

]
}
[/code]

But I get the following error:

[Errno 2] No such file or directory
[cmd: [u’scons’, u’monster_program’, u’’]]
[dir: /Users/rogerkueng/myGit/project]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
[Finished]

If I type in the same direcotry in the terminal just:

scons monster_program

it works without a problem.

What am I missing? any help would be appreciated.

0 Likes

#2

Well, where do you have scons installed and is it in the PATH that Sublime is using? (Note: Sublime and other apps will only get their PATH from whatever is set in /etc/launchd.conf as of 10.8 — ~/.MacOSX is deprecated and your shell scripts have no effect). If it’s not in the PATH, you know what you need to do.

0 Likes

#3

Thank you for your answer.

I tried to correct that by changing my build file to this:

[code]{
“cmd”: “scons”, “-j2”, “debug=1”],
“file_regex”: “^(…^:]):([0-9]+):?([0-9]+)?:? (.)$”,
“working_dir”: “${project_path:${folder:${file_path}}}”,
“path”: “/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/scons-2.2.0/SCons/”],

“variants”:

  {
     "name": "Clean",
     "cmd": "scons", "-c"]
  }

]
}
[/code]

And this should be where my scons installation is, but I still get the same error. What am I still missing?

0 Likes