calbertts
calbertts

Reputation: 1513

Command build with relative path Sublime Text2

I've installed Sublime Text2 Portable, and I've installed MinGW portable on my pendrive. I changed cmd on c++.sublime-build to put locate relative path to g++.exe, but I get a error: Not Found.

How can indicate the relative path to compilation command?

Upvotes: 1

Views: 1973

Answers (1)

messivanio
messivanio

Reputation: 2311

You can:

  • indicate a path relative to Package Folder ${packages}; variable.
  • Or you can use the 'path' option.

Example:

...    
"cmd": ["${packages}/../../../../../usr/bin/g++", "${file}", "-o", "${file_path}/${file_base_name}"],
"path": "~/.:/usr/local/bin",
...

Others variables can be found here.

Upvotes: 2

Related Questions