Home Download Buy Blog Forum Support

C/C++ header-based completition? [SOLVED]

C/C++ header-based completition? [SOLVED]

Postby linuxkid.zeuz on Mon Jul 30, 2012 8:06 pm

Hello everyone!
Ever since I evaluated this software in OS X, I've been loving it.
I was wondering if is there any plugin wich will scan the included files for functions/classes/namespaces and help with some kind of auto-completition?
More specifically speaking, I'm developing an application with GTKMM-3.0, and I would at least like it to remember myself the functions I defined in my classes.
Maybe this has allready been done, if so, can somebody point me? I tryied browsing the forums to no avail.
Thanks in advice.
Last edited by linuxkid.zeuz on Thu Aug 09, 2012 4:56 pm, edited 1 time in total.
linuxkid.zeuz
 
Posts: 6
Joined: Mon Jul 30, 2012 8:02 pm


Re: C/C++ header-based completition?

Postby linuxkid.zeuz on Wed Aug 01, 2012 2:00 am

Hey! Thanks for the prompt reply.
I've installed Clang, the Package Manager plugin, and finally SublimeClang.
However, I'm wondering, can't I use any python I've allready have installed instead of using pythonbrew? Wich, by the way, I've tried to install but still couldn't get it to build for some awkward motive like not finding the work (!!) directory.
I'm running Gentoo Linux OS alongside Mac OS X, both have the same problem with pythonbrew..
linuxkid.zeuz
 
Posts: 6
Joined: Mon Jul 30, 2012 8:02 pm

Re: C/C++ header-based completition?

Postby quarnster on Wed Aug 01, 2012 8:30 am

You don't need to do anything special on OS X, it works out of the box.

For Linux you can use whatever python you like that gets you ctypes working within Sublime's bundled python which happens to be 2.6.
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

Re: C/C++ header-based completition?

Postby linuxkid.zeuz on Wed Aug 01, 2012 12:22 pm

It didn't however, work out of the box with OS X (Snow Leopard 10.6.3) (Maybe I'm a corner case?)
What I'm stalled now is that I copied libclang.so to $HOME/.config/sublime-text-2/Packages/SublimeClang/ and still it says that it can't load the extention..
Python (2.6.8;2.7.3-rc2;3.1.7) was built with multilib support so I should be able to use the 64 bits version of libclang with it and sublime text 2 x64, still it'll fail to find it..
Thanks again for the prompt response.
Regads.-
linuxkid.zeuz
 
Posts: 6
Joined: Mon Jul 30, 2012 8:02 pm

Re: C/C++ header-based completition?

Postby linuxkid.zeuz on Wed Aug 08, 2012 11:06 am

Bump.
Ideas?
I've run out allready.
Tried copying around the .so for clang to no result..
linuxkid.zeuz
 
Posts: 6
Joined: Mon Jul 30, 2012 8:02 pm

Re: C/C++ header-based completition?

Postby linuxkid.zeuz on Thu Aug 09, 2012 4:56 pm

Ok, solved..
What I did was, in order:
Delete the package from package control.
Delete the Backup folder it creates (Just in case).
emerge (gentoo user here) the latest version of Clang and llvm (3.1-r4, the hardmasked one also works).
Copy both libclang and libLLVM-3.1 to the plugins main directory.
Use cmake to generate the configuration for libcache, and then make, wich built and linked the shared object for libcache.
Success. No more popup warnings whatsoever.
I beleave there should be an update on the github main comment as to reflex people to USE 3.1 instead of 3.0, since it has backwards compatibility.
Also, make a mention that under the CMakeFilelist fetched by package control, there is no mention for fetching, downloading or building libclang.
So building it is overdue to the user appart from building libcache.
Thanks in advice and hope this serves well for someone else.
linuxkid.zeuz
 
Posts: 6
Joined: Mon Jul 30, 2012 8:02 pm

Re: C/C++ header-based completition? [SOLVED]

Postby ntenney on Fri Aug 24, 2012 2:00 am

I've done all the steps outlined on the github page. My problem is that it only corrects the issue for a short period of time. Every so often, I'll launch ST2 and it will be like libcache was never compiled.
ntenney
 
Posts: 65
Joined: Thu May 03, 2012 9:10 pm

Re: C/C++ header-based completition? [SOLVED]

Postby linuxkid.zeuz on Mon Oct 08, 2012 7:54 pm

You just have to link the files I've stated, the problem with the backups the package control center makes is that it also takes away your includes and stuff, so you've got to get those back too (f.ex: gtkmm.h)
linuxkid.zeuz
 
Posts: 6
Joined: Mon Jul 30, 2012 8:02 pm


Return to General Discussion

Who is online

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