0

i trying to use libxml2 in GNUsetup in windows using objective-C compiling with clang. it keeps giving me the error:

$ 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

the files do existe in :c:\GNUstep\include\libxml2\libxml\

this is my GNUsetup file which compiles the files

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

and this is my file that include the libxml2 headers

#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
user63898
  • 29,839
  • 85
  • 272
  • 514

1 Answers1

0

You can try to add more flags into GNUmakefile eg.

ADDITIONAL_INCLUDE_DIRS += c:\GNUstep\include\libxml2\ .. well I don't really know how to specify a path in a makefile on Windows..

may be you will have linking problem, play with

ADDITIONAL_LIB_DIRS += -L*your dll path..*

ADDITIONAL_OBJC_LIBS += -lxml2

  • added : ADDITIONAL_INCLUDE_DIRS +=c:/GNUstep/include/libxml2 ADDITIONAL_LIB_DIRS += -Lc:/GNUstep/lib ADDITIONAL_OBJC_LIBS += -lxml2 but still getting the error – user63898 Jan 13 '13 at 14:23
  • You can make -n and grep the command that actually do the compilation and figure out what's wrong. – Fred Frith-MacDonald Jan 13 '13 at 14:30