Home Download Buy Blog Forum Support

Clang plugins, I need help

Clang plugins, I need help

Postby jfoucry on Tue Jul 10, 2012 8:33 pm

Hello,

I just discover Sublime Text yesterday... I love it (and I already brought my licence). I am developping for iOS on my Mac so I try to install and configure SublimeClang package.

In the SubliemClang.sublime-settings I just change the options part
Code: Select all
"options":
    [
        "-Wall",
        "-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",
        //"/Applications/Xcode.app/Contents/Developer/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk",
        "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk",
        //"-D__IPHONE_OS_VERSION_MIN_REQUIRED=43000"
        "-IC:/MinGW/include"
        //"-I/path/to/sources/1"
        //"-I/path/to/sources/2"
    ],


I created a myProject.sublime-project on my project fonder with:
Code: Select all
{
   "folders":
   [
      {
         "path": "/Users/jacques/Documents/Sources/MyProject"
      }
   ],
   "sublimeclang_options":
   [
      "-I${folder:${project_path:myProject}}/**"
   ]
}


I created a build setting
Code: Select all
{
   "cmd": ["/usr/local/bin/xcode-build.sh", "$file_base_name"],
   "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
   "working_dir": "${project_path:${folder}}",
   "selector": "source.m"
}


And a the script shell:
Code: Select all
#!/bin/bash

set -e

APPNAME=MyAPP
DSTROOT=/tmp/${APPNAME}

xcodebuild -sdk iphonesimulator5.1 \
   -arch i386 \
   install DSTROOT="${DSTROOT}"

/usr/local/bin/waxsim "${DSTROOT}"/Applications/"${APPNAME}".app


In fact this part work very well, and I can compile my project.

But, when I activate the SublimeClang Package I have a lots of error:

Code: Select all
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:53,24 - Error - 'UIAccelerometer' is unavailable


It seems there is some path missing, but I can' t figure which.

Is there any body who can help me?

Thanks in advance,
Jacques
jfoucry
 
Posts: 1
Joined: Tue Jul 10, 2012 8:18 pm

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 22 guests