GNUSetup objective-c,找不到libxml / tree.h'文件

时间:2013-01-13 13:35:23

标签: objective-c windows gnustep

我尝试在使用objective-C的Windows中的GNUsetup中使用libxml2 用clang编译。 它一直给我错误:

$ make CC=clang 
This is gnustep-make 2.6.2. Type 'make print-gnustep-make-help' for help.
Making all for tool sample_app...
 Compiling file HtmlParser.m ...
In file included from HtmlParser.m:1:
./HtmlParser.h:2:9: fatal error: 'libxml/tree.h' file not found
#import <libxml/tree.h>
        ^
1 error generated.
make[3]: *** [obj/sample_app.obj/HtmlParser.m.o] Error 1
make[2]: *** [internal-tool-all_] Error 2
make[1]: *** [sample_app.all.tool.variables] Error 2
make: *** [internal-all] Error 2

文件存在于:c:\ GNUstep \ include \ libxml2 \ libxml \

这是我编译文件的GNUsetup文件

include $(GNUSTEP_MAKEFILES)/common.make



TOOL_NAME = sample_app

sample_app_HEADERS = HttpManager.h UT.h HtmlParser.h
sample_app_OBJC_FILES = main.m HttpManager.m UT.m HtmlParser.m
sample_app_RESOURCE_FILES =

include $(GNUSTEP_MAKEFILES)/tool.make

这是我的文件,包含libxml2标题

#import <Foundation/Foundation.h>
#import <libxml/tree.h>
#import <libxml/parser.h>
#import <libxml/HTMLparser.h>
#import <libxml/xpath.h>
#import <libxml/xpathInternals.h>

@interface HtmlParser
{
    NSString* encoding;
}


-(id)init
{
    self = [super init];
    if(self) {
        encoding = @"UTF-8";
    }

    return self;

}


-(void)ExtractInnerSiteLinks:(NSString*) PageHtml:(NSString*) url;


@end

1 个答案:

答案 0 :(得分:0)

您可以尝试在GNUmakefile中添加更多标志,例如

ADDITIONAL_INCLUDE_DIRS + = c:\ GNUstep \ include \ libxml2 \ ..好吧我真的不知道如何在Windows上的makefile中指定路径..

可能是你有链接问题,玩

ADDITIONAL_LIB_DIRS + = -L *您的dll路径.. *

ADDITIONAL_OBJC_LIBS + = -lxml2

相关问题