Home Download Buy Blog Forum Support

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

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

Postby quarnster on Wed Feb 01, 2012 8:12 am

I'm unlikely to look into that myself, but feel free to submit a patch/pull request.
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

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

Postby tiktaalik on Mon Feb 06, 2012 5:55 pm

Don't know what I'm doing wrong here. It seems like nothing is being found from my project. I'm not at all certain what I have to include.

I've dragged the entire source for this project into sublime edit, and added the source directory (and package directory which includes more src) to the clang settings like so [1]. I'm getting the following error:

Code: Select all
D:\blahcompany\MadScience\Project\blah\dev\Source\UI\blah_Screens\Pod\Online\UIScreenPublishReview.cpp:8,10 - Fatal - 'Creation/CreationManager.hpp' file not found
Did you configure the include path used by clang properly?


on the line:

Code: Select all
#include <Creation/CreationManager.hpp>



This Creation/CreationManager should be found in "D:/blahcompany/MadScience/Project/blah/dev/Source/Creation/CreationManager.hpp"

[1] my settings:

Code: Select all
"options":
    [
        "-Wall",
        "-I/usr/lib/clang/3.0/include/",
        "-I/usr/lib/clang/2.1/include/",
        "-I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/",
        "-I/usr/lib/gcc/i686-apple-darwin11/4.2.1/include/",
        // If you code for iOS, you want to have something like the following here:
        //"-isysroot",
        //"/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk",
        //"-D__IPHONE_OS_VERSION_MIN_REQUIRED=40300",
        "-IC:/MinGW/include",
        "-I/path/to/sources/1",
        "-I/path/to/sources/2",
        "-I/D:/blahcompany/MadScience/Project/blah/dev/Package/",
        "-I/D:/blahcompany/MadScience/Project/blah/dev/Source/"
    ]
tiktaalik
 
Posts: 2
Joined: Mon Feb 06, 2012 5:47 pm

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

Postby quarnster on Mon Feb 06, 2012 6:56 pm

Code: Select all
        "-I/D:/blahcompany/MadScience/Project/blah/dev/Package/",
        "-I/D:/blahcompany/MadScience/Project/blah/dev/Source/"


Try removing the first "/" before D:
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

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

Postby tiktaalik on Mon Feb 06, 2012 9:12 pm

quarnster wrote:Try removing the first "/" before D:



Tried this but didn't have an effect. Currently looks like so:

Code: Select all
        "-ID:/blah/MadScience/Project/blahproj/dev/Package/",
        "-ID:/blah/MadScience/Project/blahproj/dev/Source/"
tiktaalik
 
Posts: 2
Joined: Mon Feb 06, 2012 5:47 pm

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

Postby GMath on Tue Feb 07, 2012 12:21 pm

+1 tiktaalik

My project tree :
Code: Select all
~/myproject/Makefile
~/myproject/src/*.cpp
~/myproject/include/*.hpp


My project's settings :
Code: Select all
{
   "settings":
   {
      "sublimeclang_options":
      [
         "-W",
         "-Wall",
         "-Wextra",
         "-Werror",

         "-I${home}/myproject/include",

         "-I/usr/lib/clang/3.0/include/",
         "-I/usr/lib/clang/2.1/include/",
         "-I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/",
         "-I/usr/lib/gcc/i686-apple-darwin11/4.2.1/include/"
      ]
   },
   "folders":
   [
      {
         "path": "myproject"
      }
   ]
}


What's wrong?
GMath
 
Posts: 13
Joined: Tue Dec 06, 2011 9:27 pm

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

Postby quarnster on Tue Feb 07, 2012 1:18 pm

Try clearing the cache (alt+d,alt+c) and if that doesn't work open up sublimeclang.py and add a "print opts" before the return in the function "get_opts". Then check the python console for what options are actually used to see if that gives you any clues.
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

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

Postby GMath on Tue Feb 07, 2012 3:53 pm

That still doesn't work. I tried everything (absolute, relative path, in my projects settings and in general settings of sublimeclang ...)
GMath
 
Posts: 13
Joined: Tue Dec 06, 2011 9:27 pm

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

Postby JesseMeyer on Thu Feb 09, 2012 11:00 pm

I have the same issue as GMath. I'm less informed than he is probably. Could anyone help me?

My current setup below-
http://i.imgur.com/dYtSz.jpg

Windows 7 64, running ST2 32bit
Last edited by JesseMeyer on Thu Feb 09, 2012 11:58 pm, edited 1 time in total.
JesseMeyer
 
Posts: 4
Joined: Thu Feb 09, 2012 10:55 pm

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

Postby rchl on Thu Feb 09, 2012 11:48 pm

JesseMeyer wrote:I have the same issue as GMath. I'm less informed than he is probably. Could anyone help me?

My current setup below-
http://i.imgur.com/dYtSz.jpg

That spaces in path look suspicious. Maybe try to move project to path without spaces.
rchl
 
Posts: 147
Joined: Fri Mar 04, 2011 11:02 pm

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

Postby JesseMeyer on Thu Feb 09, 2012 11:57 pm

Thanks for the suggestion. Unfortunately, after removing spaces (and other "special" characters) from both the directories and the include paths, and clearing the cache, the problem persists.
JesseMeyer
 
Posts: 4
Joined: Thu Feb 09, 2012 10:55 pm

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 9 guests