Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

singlecompile with objective-c #63

Closed
davidfuzju opened this issue May 5, 2015 · 2 comments
Closed

singlecompile with objective-c #63

davidfuzju opened this issue May 5, 2015 · 2 comments

Comments

@davidfuzju
Copy link

I am new to use singlecompile. is there a simple way to link objc framework such as Foundation.framework to the source file? for example, I write simple.m

#import <Foundation/Foundation.h>

int main(int argc, char *argv[]) {
    @autoreleasepool {
        NSLog(@"hello world");
    }
}

and in vim I run :SCCompile , and it occurs to these:

Undefined symbols for architecture x86_64:
  "_NSLog", referenced from:
      _main in sample-c42ea1.o
  "___CFConstantStringClassReference", referenced from:
      CFString in sample-c42ea1.o
  "_objc_autoreleasePoolPop", referenced from:
      _main in sample-c42ea1.o
  "_objc_autoreleasePoolPush", referenced from:
      _main in sample-c42ea1.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I think it is the Foundation.framework is not link in link time, so I wanna know how to solve it with SingleCompile

@davidfuzju davidfuzju changed the title single compile with objc singlecompile with objective-c May 5, 2015
@xuhdev
Copy link
Owner

xuhdev commented May 5, 2015

You can look into :SCCompileAF

@davidfuzju
Copy link
Author

oh, thanks!!!

@xuhdev xuhdev closed this as completed May 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants