Skip to content

Instantly share code, notes, and snippets.

@asakasinsky
Forked from cslarsen/objc-gcc.m
Created May 22, 2023 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asakasinsky/a2a84ea1dd453104213cec36a8c0c560 to your computer and use it in GitHub Desktop.
Save asakasinsky/a2a84ea1dd453104213cec36a8c0c560 to your computer and use it in GitHub Desktop.
How to compile Objective-C on the command line on Mac OS X
/*
* To compile objective-c on the command line:
*
* gcc -framework Foundation objc-gcc.m
*
* You may have to link with -lobjc or other libs,
* as required.
*/
#import <Foundation/Foundation.h>
int main(int argc, char** argv)
{
NSLog(@"Testing");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment