Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 1. The Objective-C Philosophy > Compiling Objective-C Programs

Compiling Objective-C Programs

 0 $ gcc scanner.m
 1 Undefined symbols:
 2   "_OBJC_CLASS_$_NSAutoreleasePool", referenced
          from:
 3       __objc_classrefs__DATA@0 in ccoRpaJq.o
 4   "_objc_msgSend", referenced from:
 5       _main in ccoRpaJq.o
 6 ...
 7 $ # On OS X
 8 $ gcc -framework Foundation scanner.m
 9 $ # On other platforms
10 $ gcc 'gnustep-config --objc-flags --base-libs'
        scanner.m

The Clang front end is intended as a drop-in replacement for GCC, so anywhere you see gcc in some instructions, you can substitute clang. On OS X, GCC is installed in /usr/bin/gcc, so it is on your path. With slightly older versions of the XCode tools, Clang was installed in /Developer/usr/bin/clang, so you may need to either specify the full path or add this location to your path. On other platforms you will generally find both on your path, if they are installed.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint