Fatal Error Foundation/nsobject.h No Such File Or Directory Compilation Terminated
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of foundation/foundation.h no such file or directory ubuntu this site About Us Learn more about Stack Overflow the company Business
Undefined Reference To `objc_get_class'
Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask undefined reference to symbol 'objc_msg_lookup' Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign
Foundation.h Not Found
up Cant find Foundation/NSObject.h in Linux while build Obj-c Program up vote 4 down vote favorite 2 I was just starting to study obj-c on Ubuntu Linux today, the tutorial that I followed is http://www.otierney.net/objective-c.html, when I typed in the code that requires for Foundation/NSObject.h, the error appeared: Fraction.h:1: fatal error: Foundation/NSObject.h: No such file or directory and i searched for the solutions, gnustep ubuntu and found a proper one gcc -o Fraction -I/usr/GNUstep/System/Library/Headers -L/usr/GNUstep/System/Library/Libraries Fraction.m -ldl -lobjc I tried this, but I found that I cannot find Headers under the Library directory. (My folder of GNUstep is /usr/share/GNUstep). Does anyone know how to achieve the Headers? I installed all the dev packages related to GNUstep but still no luck. Hope I state my question clear enough. Sorry for my English. objective-c linux gnustep share|improve this question edited Apr 15 '11 at 5:42 asked Apr 15 '11 at 4:40 hjbolide 128111 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote Try with gnustep-config gcc `gnustep-config --objc-flags` \ `gnustep-config --objc-libs` Fraction.m -o Fraction share|improve this answer answered May 6 '11 at 20:03 mathk 3,66342053 thanks, I'll try that when I get home, and return to this post –hjbolide May 7 '11 at 1:45 add a comment| up vote 0 down vote GNUStep uses a fairly involved set of gmake macros - I wouldn't expect a simple command-line invocation of gcc to work very well, although to be honest I haven't tried that way myself.
06:57 AMHi. I'd like to set up an environment for learning objective C on my laptop. I'm using Hardy on a 32-bit system. I found this page: http://blog.lyxite.com/2008/01/compile-objective-c-programs-using-gcc.html But the installation instructions were brief and insufficient. I install these packages via apt-get: gnustep gnustep-base-runtime gnustep-base-libgnustep-base-dev libgnustep-base1.14 libgnustep-gui-dev libgnustep-gui0.12 common Compiling his example, I get: hello.m:2:34: error: Foundation/Foundation.h: No such file or directory hello.m:5: error: cannot find interface declaration for ‘NSObject’, superclass of ‘HelloWorld’ hello.m: In function ‘-[HelloWorld hello]’: hello.m:10: error: cannot find interface declaration for ‘NXConstantString’ hello.m: In function ‘main’: hello.m:15: warning: ‘HelloWorld’ may not respond to http://stackoverflow.com/questions/5672460/cant-find-foundation-nsobject-h-in-linux-while-build-obj-c-program ‘+alloc’ hello.m:15: warning: (Messages without a matching method signature hello.m:15: warning: will be assumed to return ‘id’ and accept hello.m:15: warning: ‘...’ as arguments.) hello.m:15: warning: no ‘-init’ method found hello.m:17: warning: ‘HelloWorld’ may not respond to ‘-release’ I figure the first line means that I'm missing an essential set of header files. I'm also guessing that this should be fixed after I apt-get the right package. Which further https://ubuntuforums.org/archive/index.php/t-890425.html package or packages do I need? Thanks ilrudieAugust 15th, 2008, 01:08 PMMost likely you are just not searching in the right place on your pc for the headers. Put the full path to the header in your include statement or better yet use the -I option on gcc to include a path to search for header files. If you don't know where the headers are (and I don't know where objective-c headers would be either) use find / -name header_file_name.h -printIf that doesn't work you will then need to find which package include the required header file. Search for it in synaptic. jgfootJanuary 5th, 2009, 02:08 AMI struggled with this for a while myself, but I think I've got it working. To compile PURE Objective-C -- that is, NO GNUSTEP -- you can just do a command like this from the command line (where foo.m is your source code): $ gcc -lobjc foo.m -o foo_run Basically, the same as for compiling any other code with gcc, except you include "-lobjc" to link the Objective-C library. But, there isn't much point in writing Objective-C without GNUStep. To use GNUStep, I had to do the following: 1. Make sure the gnustep-common package is installed. (Of course, you als
• Software • Contact • Site Map Blog index GC3 graudates into S3IT Posted early Tuesday morning, July 1st, 2014 How to create a module that also load a virtualenvironment Posted late https://www.gc3.uzh.ch/blog/Compile_a_Objective-C_application_on_Ubuntu___40__Hobbes_instance__41__/ Friday morning, March 7th, 2014 Openstack workshop at GC3 Posted at noon on Saturday, February 22nd, 2014 Moving LVM volumes used by a Cinder storage Posted late Friday evening, February 21st, 2014 https://lists.gnu.org/archive/html/info-gnustep/2014-09/msg00002.html How to configure swift glusterfs Posted Monday night, February 10th, 2014 Yet another timeout problem when starting many instances at once Posted late Friday night, February 8th, 2014 Fixing LDAP Authentication no such over TLS/SSL Posted Monday night, January 6th, 2014 Linker command-line options for Intel MKL Posted Saturday night, January 4th, 2014 A virtue of lazyness Posted Saturday afternoon, December 21st, 2013 (Almost) readable CFEngine logs Posted Thursday afternoon, December 19th, 2013 CFEngine error: ExpandAndMapIteratorsFromScalar called with invalid strlen Posted Wednesday afternoon, December 11th, 2013 'Martian source' log messages and the default IP route Posted Monday no such file afternoon, November 25th, 2013 GC3 takes over maintenance of the Schroedinger cluster Posted at noon on Monday, November 4th, 2013 Grid Engine: how to find the set of nodes that ran a job (after it's finished) Posted early Wednesday morning, October 30th, 2013 Python2 vs Python3 Posted at teatime on Friday, September 13th, 2013 GC3Pie 2.1.1 released Posted Friday evening, September 6th, 2013 A NUMA multiprocessor machine for the `Advanced Scientific Programming in Python' Summer School Posted late Tuesday morning, September 3rd, 2013 Happy SysAdmin day! Posted mid-morning Friday, July 26th, 2013 Object-oriented Python training Posted Thursday afternoon, July 25th, 2013 Elasticluster 1.0.0 released Posted Thursday night, July 18th, 2013 Short Autotools tutorial Posted at lunch time on Friday, July 5th, 2013 Patch Emacs' PostScript printing Posted Tuesday evening, June 11th, 2013 Slides of the Object-oriented Python course now available! Posted Tuesday evening, June 11th, 2013 Compile an Objective-C application on Ubuntu (Hobbes instance) Posted Friday evening, May 31st, 2013 Automated deployment of CFEngine keys Posted at midnight, May 31st, 2013 blog/Resize_an_image Posted Tuesday evening, May 14th, 2013 Join us at the Compute Cloud Experience Workshop! Posted early Monday mo
windows 7 Date: Wed, 3 Sep 2014 10:27:30 +0800 (CST) > -----Original E-mail----- > From: "Richard Frith-Macdonald"
> Sent Time: 2014-9-2 19:49:38 > To: address@hidden > Cc: address@hidden, address@hidden > Subject: Re: One problem for gcc compile object-c on windows 7 > > On 2 Sep 2014, at 06:56, address@hidden wrote: > > > > Hi all, > > > > I am a newbie for object-c, I am study object-c on windows 7, as I found > > http://www.gnustep.org/experience/Windows.html is very useful for me, so I > > setup the environment as it said: install MinGW and GNUstep Core, then I > > can use gcc to compile the first object-c program which do not include any > > foundation header files, like