When I try to run the following code, xcode throws the following error. What is causing this?
#import <Foundation/Foundation.h>
#include <readline/readline.h>
int main(int argc, const char * argv[])
{
@autoreleasepool {
NSLog(@"What number would you like to count down by three from?");
const char *countFrom = readline(NULL);
NSString *result = [NSString stringWithUTF8String:countFrom];
NSLog(@"Counting down from %@", result);
}
return 0;
}
Undefined symbols for architecture x86_64: "_readline", referenced from: _main in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
readline
implemented and how are you linking it? – Phillip Mills