Amazon.com Widgets prog1.m:3:34: error: Foundation/Foundation.h: No such file or directory
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 22, 2014, 08:01:42 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
|-+  Old Stuff
| |-+  Program Examples
| | |-+  Chapter 2
| | | |-+  prog1.m:3:34: error: Foundation/Foundation.h: No such file or directory
Pages: [1]   Go Down
Print
Author Topic: prog1.m:3:34: error: Foundation/Foundation.h: No such file or directory  (Read 3920 times)
arel
Newbie
*
Posts: 10






« on: May 21, 2011, 05:26:39 PM »

I try to compile the program, and get the following errors:

prog1.m:3:34: error: Foundation/Foundation.h: No such file or directory
prog1.m: In function ‘main’:
prog1.m:7: error: ‘NSAutoreleasePool’ undeclared (first use in this function)
prog1.m:7: error: (Each undeclared identifier is reported only once
prog1.m:7: error: for each function it appears in.)
prog1.m:7: error: ‘pool’ undeclared (first use in this function)

I have checked the program, and can't find a mistake in the program. I have no idea what I am doing wrong.
Logged
arel
Newbie
*
Posts: 10






« Reply #1 on: May 22, 2011, 09:15:37 AM »

This is in the terminal by the way.
Logged
skochan
Administrator
Hero Member
*****
Posts: 3114







« Reply #2 on: May 23, 2011, 08:17:53 AM »

Can I see your command line you are typing?   Are you using the -framework foundation command line option as shown in the text?

Cheers,

Steve
Logged
arel
Newbie
*
Posts: 10






« Reply #3 on: May 23, 2011, 11:57:33 AM »

I'm typing exactly what it says in the text.

gcc -framework Foundation prog1.m -o prog1

Thanks for the help!

Arel
Logged
arel
Newbie
*
Posts: 10






« Reply #4 on: May 23, 2011, 12:31:21 PM »

Now I am getting an error related to gcc.

gcc -framework Foundation prog1.m -o prog1
-bash: gcc: command not found

Logged
arel
Newbie
*
Posts: 10






« Reply #5 on: May 23, 2011, 10:24:49 PM »

I updated to Xcode 4 (for $5  Angry ) and now everything in the terminal is working great!
Logged
skochan
Administrator
Hero Member
*****
Posts: 3114







« Reply #6 on: May 24, 2011, 04:38:58 PM »

Glad to hear that.  I didn't have a clue what was going on! 

Cheers,

Steve
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.