Sublime Forum

Clang plugins, I need help

#1

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]“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"
],[/code]

I created a myProject.sublime-project on my project fonder with:

[code]{
“folders”:

	{
		"path": "/Users/jacques/Documents/Sources/MyProject"
	}
],
"sublimeclang_options":

	"-I${folder:${project_path:myProject}}/**"
]

}[/code]

I created a build setting

{ "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]#!/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[/code]

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:

/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

0 Likes