discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help - Clang can't find <objc/objc.h> on Ubuntu


From: Amr Aboelela
Subject: Re: Help - Clang can't find <objc/objc.h> on Ubuntu
Date: Sat, 25 Feb 2012 23:52:04 -0800

3. Make link to objc directory:

        $ locate objc.h

/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/include/objc/objc.h

- Then:
        /usr/local/include$ sudo ln -s /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/include/objc/ objc


On Sat, Feb 25, 2012 at 12:49 PM, Ivan Vučica <ivucica@gmail.com> wrote:
Aside from what everyone posted, see also this old post of mine in case you want to get everything to work with stock Debian packages:
http://blog.vucica.net/2010/12/getting-objective-c-2-0-to-work-on-debians-gnustep-with-clang.html 

I last tried this... back in December 2010, obviously.

It would be a really good idea, however, to build as much stuff from source if you want to do GNUstep development.

On Sat, Feb 25, 2012 at 18:42, Jens Alfke <jens@mooseyard.com> wrote:
I’m trying to get started with GNUstep development but running into problems getting the LLVM compiler and libobjc2 set up correctly.

My story: I’ve got some Foundation-level Cocoa code (i.e. no UI) that runs on OS X 10.7 and iOS 5, and I’d like to get it running in GNUstep on Linux. Syntactically, this code uses properties and blocks pretty heavily (but not GCD).

So I’ve installed Ubuntu 11.10 x86 inside VirtualBox on my MacBook Pro, and installed the following packages via apt-get:
* gnustep
* gnustep-devel
* llvm
* clang
* libobjc2

I can build & run a trivial app that calls NSLog (the example from the makefile tutorial.) And I’ve set up a makefile for my code, but when I try to build it I run into compiler problems.

If I just run “make”, GCC [4.6.1] barfs on the first use of the “^” character. So apparently it doesn’t have the Apple block extensions:
> Source/Header.h:19:11: error: expected identifier or ‘(’ before ‘^’ token

OK, according to instructions on the gnustep site, I can enter “make CC=clang LD=gcc” to build with Clang. But when I do this, Clang [2.9] can’t find objc.h:

> /usr/include/GNUstep/GNUstepBase/preface.h:112:11: fatal error: 'objc/objc.h' file not found
>  #include <objc/objc.h>

The only copy of objc.h on my system is /usr/lib/gcc/i686-linux-gnu/4.6/include/objc/objc.h.
So apparently I either need to
(a) configure Clang to search that directory (which I’m reluctant to do because it may have GCC-specific stuff in it), or
(b) copy the objc/ header directory into Clang’s header search path (where?), or
(c) reconfigure libobjc2 to understand that I have Clang installed and put its headers in the right place

I’m not sure which of these is appropriate. Actually I’m confused because it sounds from what I’ve read (i.e. the libobjc2 1.6 announcement) as though libobjc2 has Clang/LLVM specific functionality, so I expected that the two would play nicely together if I installed both, without need for further customization. But I’m fairly clueless about Linux and apt-get so I may just have done something wrong…

Thanks!

—Jens


_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep



--
Ivan Vučica - ivan@vucica.net



_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep




--
Info about Islam: http://wikiz.info/islam
Latest news on twitter: http://www.twitter.com/zagel
Contribute in a wiki: http://wikiz.info



reply via email to

[Prev in Thread] Current Thread [Next in Thread]