Sublime Forum

ST3 Sublime CLang

#1

Can anyone help me get sublimeclang working in Sublime text 3 ???.. i tried making some changes in the code to support python3 but it is not working…

0 Likes

SublimeClang Windows 8.1 x64
#2

Heh… I ended up here while looking for the exact same answer. Before I even tried the code from the master repo of SublimeClang, I assumed that I need the libclang.dll (because I’m working on Windows) and libcache.dll, and maybe .dylib files as well. Seems like quarnster compiled libclang.dll with Visual C++. How to make libcache.dll… there are instructions in README file. Unfortunately, I do not have Visual C++.

What error you are getting?

0 Likes

#3

i installed via package control and followed the errors posted by st3 and made the corrections to suite python3 like changes in import, print etc… But in the end i found that i am stuck without any solution… I am getting a make error when compiling with the git repo

0 Likes

#4

Via Package Control you get old build (1.0.41) that doesn’t have ST3 fixes. The current master branch should work, but it lacks of clang binaries etc.

0 Likes

#5

Are you still in need of the dll files… i finally got it working :smile:

0 Likes

#6

Yes, if you can describe how to compile dll files it would be most appreciated.

0 Likes

#7

This would be very helpful to know how to get clang working with the latest version of ST3.

0 Likes

#8

My feelings against the company behind Sublime Text goes something in the lines of:

You sell a text editor that does the same as many other FREE editors out there, but yours look better, but also costs the same as a student license for a DEV IDE.
Why not create decent documentation on how to get the most common things working in your product, instead of forcing frustrated paying users try to get help on a forum that does not always provide correct answers considering that the editor is multi-platform?

I believe most of ST’s users are indeed developers or technical writers.

The minimum documentation that should be freely available to paying customers like myself should be:

  • How to set up ST for use with the most popular compilers fore code development. (GCC, Clang)
  • Changes to this setup when product updates gets released.
  • A tutorial on how to use plugins and JSON syntax in config files.
  • A tutorial on how to configure custom build/compile/run configurations using the build system via JSON

Personally I get so frustrated by using Sublime right now, that I use other alternatives instead. Specialized tools for specialized applications, in the true UNIX spirit.

If you can make one product do everything, GREAT!
In the meanwhile I’ll use specialized tools.

So that was my license bucks flying out the window… :imp:

PS! Doing a “sublime” + “clang compiler” Google search returns 27.200 results.

Chris

0 Likes

#9

[quote=“cseder”]My feelings against the company behind Sublime Text goes something in the lines of:

You sell a text editor that does the same as many other FREE editors out there, but yours look better, but also costs the same as a student license for a DEV IDE.
Why not create decent documentation on how to get the most common things working in your product, instead of forcing frustrated paying users try to get help on a forum that does not always provide correct answers considering that the editor is multi-platform?

I believe most of ST’s users are indeed developers or technical writers.

The minimum documentation that should be freely available to paying customers like myself should be:

  • How to set up ST for use with the most popular compilers fore code development. (GCC, Clang)
  • Changes to this setup when product updates gets released.
  • A tutorial on how to use plugins and JSON syntax in config files.
  • A tutorial on how to configure custom build/compile/run configurations using the build system via JSON

Personally I get so frustrated by using Sublime right now, that I use other alternatives instead. Specialized tools for specialized applications, in the true UNIX spirit.

If you can make one product do everything, GREAT!
In the meanwhile I’ll use specialized tools.

So that was my license bucks flying out the window… :imp:

PS! Doing a “sublime” + “clang compiler” Google search returns 27.200 results.

Chris[/quote]

Yeah, I hear ya. I also payed the 70$ for the registered version of ST3 (I don’t regret it). I really do like this editor, but it seems like there’s a few (what I would consider) key features that haven’t been incorporated. For example, if I instantiate a struct, I don’t think it’s too much to ask for me to be able to auto-complete the members of that struct. That being said, if there’s a plugin method of doing so, I’d like to know about it.

0 Likes

#10

[quote=“kblomqvist”]

Yes, if you can describe how to compile dll files it would be most appreciated.[/quote]

Download sublimeclang git to the packages folder of ST3
1.git clone --recursive github.com/quarnster/SublimeClang SublimeClang
2.git pull && git submodule foreach --recursive git pull origin master

Copy the libcache.dll and libclang.dll files found in the sublimeclang installed with package control into Sublimeclang/internals/

If you want to compile the dll files all by yourself… then follow the steps in http://clang.llvm.org/get_started.html or ones i used below to compile libclang.dll
You need to have visual studio installed

  1. svn co llvm.org/svn/llvm-project/llvm/trunk llvm
  2. cd llvm\tools
  3. svn co llvm.org/svn/llvm-project/cfe/trunk clang
  4. Run CMake to generate the Visual Studio solution and project files:
    - cd … (back to where you started)
    - mkdir build
    - cd build
    - Visual Studio 2008: cmake -G “Visual Studio 9 2008” …\llvm
    - Visual Studio 2010: cmake -G “Visual Studio 10” …\llvm
    - Visual Studio 2011: cmake -G “Visual Studio 11” …\llvm
    5.You should now have libclang.vcxproj in “build\tools\clang\tools\libclang” path.
    6.Open the visual studio command prompt and move the path where the file in above step is mentioned
    - msbuild libclang.vcxproj /m /p:Configuration=Release
  5. This will generate the libclang.dll file in “build\bin\Release”.
    8.Download sublimeclang git to the packages folder of ST3
    - git clone --recursive github.com/quarnster/SublimeClang SublimeClang
    - git pull && git submodule foreach --recursive git pull origin master
    9.Copy the generated dll file into “SublimeClang\internals”
  6. cd SublimeClang/src
    - mkdir build
    - cd build
    - cmake …
  7. Run msbuild libcache.vcxproj /m /p:Configuration=Release
  8. This should generate libcache.dll file in “SublimeClang\src\build\Release”
  9. Copy to “SublimeClang\internals”
  10. This should get you going

Hope this helps and its not too long … I am not an expert, so bear with the errrors…

0 Likes

#11

I wonder if it’s possible to just use clang.exe from within Cygwin (C:\cygwin\clang.exe)?

0 Likes

#12

Does the instruction work for mac os x as well?

[quote=“nikhilkalige”]

Yes, if you can describe how to compile dll files it would be most appreciated.

Download sublimeclang git to the packages folder of ST3
1.git clone --recursive github.com/quarnster/SublimeClang SublimeClang
2.git pull && git submodule foreach --recursive git pull origin master

Copy the libcache.dll and libclang.dll files found in the sublimeclang installed with package control into Sublimeclang/internals/

If you want to compile the dll files all by yourself… then follow the steps in http://clang.llvm.org/get_started.html or ones i used below to compile libclang.dll
You need to have visual studio installed

  1. svn co llvm.org/svn/llvm-project/llvm/trunk llvm
  2. cd llvm\tools
  3. svn co llvm.org/svn/llvm-project/cfe/trunk clang
  4. Run CMake to generate the Visual Studio solution and project files:
    - cd … (back to where you started)
    - mkdir build
    - cd build
    - Visual Studio 2008: cmake -G “Visual Studio 9 2008” …\llvm
    - Visual Studio 2010: cmake -G “Visual Studio 10” …\llvm
    - Visual Studio 2011: cmake -G “Visual Studio 11” …\llvm
    5.You should now have libclang.vcxproj in “build\tools\clang\tools\libclang” path.
    6.Open the visual studio command prompt and move the path where the file in above step is mentioned
    - msbuild libclang.vcxproj /m /p:Configuration=Release
  5. This will generate the libclang.dll file in “build\bin\Release”.
    8.Download sublimeclang git to the packages folder of ST3
    - git clone --recursive github.com/quarnster/SublimeClang SublimeClang
    - git pull && git submodule foreach --recursive git pull origin master
    9.Copy the generated dll file into “SublimeClang\internals”
  6. cd SublimeClang/src
    - mkdir build
    - cd build
    - cmake …
  7. Run msbuild libcache.vcxproj /m /p:Configuration=Release
  8. This should generate libcache.dll file in “SublimeClang\src\build\Release”
  9. Copy to “SublimeClang\internals”
  10. This should get you going

Hope this helps and its not too long … I am not an expert, so bear with the errrors…[/quote]

0 Likes