下面是ICE官方关于这个问题的回复型知轿:
Note that if you are trying to build a static library, it's currently not supported by the Ice Touch Xcode plugin. You will need to manually setup the compiler flags with your Xcode project, so do not set "Additional SDKs" to disable the Xcode plugin and add /Developer/SDKs/IceTouch-1.2/$(PLATFORM_NAME)/usr/local/include to your include directories. You will also need to either manually compile the Slice files with slice2objc or write a script to do it. We will check whether or not we can add support for static library projects to the Ice Touch Xcode plugin.
具体方法如下。1、需要手动去配置使橘春用ice需要的头文件路径和库文件路径以及指定链接卜答标志。
2、需要手动处理ice文件,并需要把处理圆弊耐ice文件后生成构造函数。
public class FilenameDemo{
public static void main(String[] args) {
Filename myHomePage = new Filename("/home/men/index.html", '/', '.')
System.out.println("Extension="+myHomePage.extension())
System.out.println("Filename="行备+myHomePage.filename())
System.out.println("Path="+myHomePage.path())
}
}
class Filename
{
private String fullPath
private char pathSeparator, extensionSeparator
public Filename(String str, char sep, char ext){
fullPath=str
pathSeparator=sep
extensionSeparator=ext
}
public String extension() {
int dot =fullPath.lastIndexOf(extensionSeparator)
return fullPath.substring(dot+1)
}
public String filename() {
int dot=fullPath.lastIndexOf(extensionSeparator)
int sep=fullPath.lastIndexOf(pathSeparator)
return fullPath.substring(sep+1,dot)
}
public String path() {
int sep=fullPath.lastIndexOf(pathSeparator)
return fullPath.substring(0,sep+1)
}
}
这是修改之后的代码,可以用。
如果你是在DOS命档槐毁令下运行这段代码,你应该把Filename类写在另一个文件里。不明白明改的话,hi我吧。
如果对您有帮助,请记得采纳为满意答案,谢谢!祝您生活愉快!
vaela
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)