Home Download Buy Blog Forum Support

clang (C/C++/Objective-C/Objective-C++) autocomplete

Re: clang (C/C++/Objective-C/Objective-C++) autocomplete

Postby thekyz on Wed Dec 21, 2011 3:10 pm

Hi, sorry for the newbyness but, on windows, how do you specify the include path ? It seems to never find my standard c includes.
Z:\local\pegasusmanager\LIBPEGASUSMANAGER_01_00_00\bins\fpgaconfig\fpgaconfig.c:15,10 - Fatal - 'stdint.h' file not found
Did you configure the include path used by clang properly?
See http://github.com/quarnster/SublimeClang for more details on how to configure SublimeClang.

Thanks a lot :)
thekyz
 
Posts: 20
Joined: Fri Feb 04, 2011 9:27 am

Re: clang (C/C++/Objective-C/Objective-C++) autocomplete

Postby quarnster on Wed Dec 21, 2011 7:22 pm

You need to open up the SublimeClang settings and tweak the "options" list by adding "-IC:/wherever/your/include/files/are". A good start would be to search for stdint.h. Please let me know what path it resides in on your Windows installation and I'll add it as a default path.
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

Re: clang (C/C++/Objective-C/Objective-C++) autocomplete

Postby ttvd on Thu Dec 22, 2011 12:41 am

quarnster wrote:Are you working with huge files or is there any other reason you must use the 64-bit executable of Sublime Text 2?


No i do not work with large files, but I found that x64 version of sublime is faster on my machine than x32 for w/e reason. Do you have any suggestion as to what might be the problem with my x64 libclang ?

Thanks.
ttvd
 
Posts: 8
Joined: Sun Apr 17, 2011 12:57 am

Re: clang (C/C++/Objective-C/Objective-C++) autocomplete

Postby quarnster on Thu Dec 22, 2011 10:19 am

No idea what the problem might be, but you could try this simple C++ sample and see if that works to isolate whether it's your libclang.dll or something with the python bindings that's broken. Please do let me know if you figure it out.
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

Re: clang (C/C++/Objective-C/Objective-C++) autocomplete

Postby thekyz on Thu Dec 22, 2011 3:36 pm

quarnster wrote:You need to open up the SublimeClang settings and tweak the "options" list by adding "-IC:/wherever/your/include/files/are". A good start would be to search for stdint.h. Please let me know what path it resides in on your Windows installation and I'll add it as a default path.


Well the file is there : c:\MinGW\include

And none of those work:
Code: Select all
    "options":
    [
        "-Wall",
        "-I/C/MinGW/include",
        "-IC/MinGW/include",
        "-IC:/MinGW/include"
    ]
thekyz
 
Posts: 20
Joined: Fri Feb 04, 2011 9:27 am

Re: clang (C/C++/Objective-C/Objective-C++) autocomplete

Postby quarnster on Thu Dec 22, 2011 4:35 pm

Actually, looks like you've found a bug in Sublime Text.

Please upgrade the plugin to the latest version just submitted that has a fix for this or move the options to your SublimeClang user settings. "-IC:/MinGW/include" should work just fine and is now added to the default include paths. Please let me know if this fixes the issue or if you're still having problems. Thanks.
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

Re: clang (C/C++/Objective-C/Objective-C++) autocomplete

Postby quarnster on Thu Dec 22, 2011 4:43 pm

BTW, you probably want to edit the SublimeClang user settings anyway as the default settings might be overwritten when the plugin is updated.
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

Re: clang (C/C++/Objective-C/Objective-C++) autocomplete

Postby thekyz on Thu Dec 22, 2011 5:16 pm

It works thanks.

I'll edit my user settings as you suggested.
thekyz
 
Posts: 20
Joined: Fri Feb 04, 2011 9:27 am

Re: clang (C/C++/Objective-C/Objective-C++) autocomplete

Postby sjj_512 on Wed Jan 04, 2012 5:00 am

This is awesome. Love this. I've gotten a fairly complex C++ project, and most things are now working for me.

One thing that doesn't seem to work for me, is the ctrl-d ctrl-i to jump to the definition. It displays "Don't know where the implementation is!" on the sublime status line. I've peeked at the Python code for the error, but not sure where the problem is or how to debug the python.

I've tried with a simple test: myutil.h and myutil.c that exist in the same directory. I've also made sure that I've got a -I to the same directory that holds myutil.h in the SublimeClang.sublime-settings file. I'm on Mac OS X Lion.

.c file is like:
#include <myutil.h>

int myFunc(int a, int b, double c) {
return a + b;
}

and .h file just has:
int myFunc(int a, int b, double c);

Any ideas?

Thanks again for the excellent work!
sjj_512
 
Posts: 2
Joined: Wed Jan 04, 2012 4:51 am

Re: clang (C/C++/Objective-C/Objective-C++) autocomplete

Postby quarnster on Wed Jan 04, 2012 10:20 am

Try updating the plugin now, it should be fixed in the latest version in git.

Thanks for reporting this and please let me know if it now works or if it's still broken :)
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 12 guests