Amazon.com Widgets clang changed?
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 28, 2014, 11:04:36 PM
Home Help Search chat Login Register   
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+  Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+  Programming in Objective-C, 4th edition
| |-+  Chapter 2
| | |-+  clang changed?
Pages: [1]   Go Down
Print
Author Topic: clang changed?  (Read 2158 times)
softhanded
Newbie
*
Posts: 1






« on: February 04, 2012, 01:25:46 PM »

Have clang options changed? I get the following error when using clang as described in Chapter 2:

$ clang -fobjc-arc –framework Foundation main.m -o prog1
clang: error: no such file or directory: '–framework'
clang: error: no such file or directory: 'Foundation

When I do

$man clang

I see I'm using 3.0 dated 2011-11-04. I don't see the -framework option documented (nor -fobj-arc). I gather it's different in 3.0 than in the book?
Logged
sbauer
Newbie
*
Posts: 1






« Reply #1 on: February 10, 2012, 05:49:14 AM »


I have the same problem.  Anyone know the correct syntax?
Logged
skochan
Administrator
Hero Member
*****
Posts: 3114







« Reply #2 on: February 10, 2012, 11:06:37 AM »

That command line still works for me.  Are you running Lion?  Le the know what version of OS X and Xcode you have installed.

Cheers,

Steve
« Last Edit: February 10, 2012, 11:22:12 PM by skochan » Logged
glimpse
Newbie
*
Posts: 6







« Reply #3 on: February 21, 2012, 07:37:54 PM »

That command line still works for me.  Are you running Lion?  Le the know what version of OS X and Xcode you have installed.

I should have read this thread earlier as the error corresponds closely to mine, but since no solution has been posted yet, I'm going to butt in with my info:

I am running Lion, 10.7.3.
My version of clang is 3.1, see VERSION below).
My version of Xcode is 4.3

And FWIW, your book 4th Edition) omits the need to separately download the "command line tools"; i.e. they do not come with Xcode 4.3. Perhaps an update???

VERSION:
clang -v
Apple clang version 3.1 (tags/Apple/clang-318.0.45) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.3.0
Thread model: posix
Logged

--
glimpse
dbrady
Newbie
*
Posts: 1






« Reply #4 on: July 31, 2012, 01:41:18 PM »

Just ran into the same issue, up until I upgraded to Mountain Lion it had worked fine.  I've just finished installing the latest Command line tools, same problem, then I removed the -framework giving a command line of:
clang -fobjc-arc  program.m -o program

compiled successfully and ran, perhaps preprocessor no longer needs the -framework option, it's not in the clang manpage either
Logged
Pages: [1]   Go Up
Print
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.