- Install and build SublimeClang into the packages folder of ST3
git clone --recursive https://github.com/quarnster/SublimeClang SublimeClang
cd SublimeClang/
git pull && git submodule foreach --recursive git pull origin master
cp /path/to/llvm/Release/lib/libclang.so internals/
cd src
mkdir build
cd build/
cmake ..
make
-
restart ST3
-
go to menu: Tools->Command Palette...->Preferences: SublimeClang Settings - User
File should be empty on a fresh install. Add the following with paths adapted to what your environment
{
"options_script": "python /home/dennis/Coding/Project-OSRM/cmake/cmake_options_script.py /home/dennis/Coding/Project-OSRM/build/compile_commands.json",
"options": [
"-Wno-unused-command-line-argument",
"-Wno-unknown-pragmas",
"-std=c++11",
"-I/home/dennis/Coding/Project-OSRM/ThirdParty"
],
"hide_output_when_empty": true,
"reparse_on_activated": true,
"reparse_on_save": true
}
The CMake options script-parsing the json compile DB- can be found here.
- if this error occurs:
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/cstddef:51,11 - Error - no member named 'max_align_t' in the global namespace
Then edit /usr/include/c++/4.9.1/cstddef
. Path may vary depending on error message.
Add a define around the following line:
using ::max_align_t;
to look like this:
#ifndef __clang__
using ::max_align_t;
#endif