Home Download Buy Blog Forum Support

ST3: C++ default build settings and package control messages

ST3: C++ default build settings and package control messages

Postby acgetchell on Fri Aug 23, 2013 11:42 pm

I'm trying to change the compiler options when building C++ files in Sublime Text 3 on MacOS 10.8.4.

I found /Library/Application Support and /Applications/Sublime Text.app/Contents/MacOS/Packages/C++.sublime-package and copied it to my home directory. From there I unzipped it, and changed C++.sublime-build to:

{
"shell_cmd": "g++ \"${file}\" -o \"${file_path}/${file_base_name}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",

"variants":
[
{
"name": "Run",
"shell_cmd": "clang++ \"${file}\""
}
]
}

Then I created the directory /Applications/Sublime Text.app/Contents/MacOS/Packages/C++ and placed this file there, and restarted ST3.

However, the settings haven't taken, because doing Run creates the executable with the same name as the source file (the default), instead of "a.out" (the default for clang++). What did I do wrong?

For my second question I submitted it to https://github.com/wbond/sublime_packag ... issues/582
acgetchell
 
Posts: 1
Joined: Fri Aug 23, 2013 11:08 pm

Return to General Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 15 guests