discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to enable regexp im getting :error: use of undeclared identifier 'NS


From: umen
Subject: how to enable regexp im getting :error: use of undeclared identifier 'NSRegularExpression'; did you mean 'NSRegularExpressionSearch
Date: Wed, 16 Jan 2013 02:31:50 -0800 (PST)

hello i want to run simple regexp with objective-c 
as this example : 
 
https://developer.apple.com/library/mac/#documentation/Foundation/Reference/NSRegularExpression_Class/Reference/Reference.html
<https://developer.apple.com/library/mac/#documentation/Foundation/Reference/NSRegularExpression_Class/Reference/Reference.html>
  

but when i compile the file with: $ make CC=clang
im getting :
HtmlParser.m:21:2: error: use of undeclared identifier
'NSRegularExpression'; did you mean 'NSRegularExpressionSearch'?
        NSRegularExpression *regex = [NSRegularExpression
regularExpressionWithPattern:@"href=[\\'\\"]?([^\\'\\" >]+)"
        ^~~~~~~~~~~~~~~~~~~
        NSRegularExpressionSearch
C:/GNUstep/GNUstep/System/Library/Headers\Foundation/NSString.h:122:2: note:
'NSRegularExpressionSearch' declared here
 NSRegularExpressionSearch = 1024
 ^


with this code:
 NSError *error = NULL;
        NSRegularExpression *regex = [NSRegularExpression
regularExpressionWithPattern:@"href=[\\'\\"]?([^\\'\\" >]+)"
                                                                      
options:NSRegularExpressionCaseInsensitive
                                                                        
error:&error];


when i try to find the method in the Foundation headers i do see it 

// GNUstep, like OS X, uses libicu to provide the NSRegularExpression
// implementation.  If you have configured GNUstep without this support then
it
// will not work, so these methods are hidden.
#if GS_USE_ICU || GS_UNSAFE_REGEX
+ (NSRegularExpression*)regularExpressionWithPattern: (NSString*)aPattern
                                             options:
(NSRegularExpressionOptions)opts
                                               error: (NSError**)e; 


how do i enable using libicu ( i have the libicu dll's )



--
View this message in context: 
http://gnustep.8.n7.nabble.com/how-to-enable-regexp-im-getting-error-use-of-undeclared-identifier-NSRegularExpression-did-you-mean-h-tp32400.html
Sent from the GNUstep - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]