From owner-freebsd-questions@FreeBSD.ORG Mon Jan 5 18:48:38 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8F2AD64 for ; Mon, 5 Jan 2015 18:48:38 +0000 (UTC) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:c:538::196]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A17C272E for ; Mon, 5 Jan 2015 18:48:38 +0000 (UTC) Received: from mfilter3-d.gandi.net (mfilter3-d.gandi.net [217.70.178.133]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id BB8E91720B1 for ; Mon, 5 Jan 2015 19:48:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter3-d.gandi.net Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter3-d.gandi.net (mfilter3-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id h9idaks3pnPC for ; Mon, 5 Jan 2015 19:48:35 +0100 (CET) X-Originating-IP: 120.60.165.96 Received: from localhost (triband-mum-120.60.165.96.mtnl.net.in [120.60.165.96]) (Authenticated sender: mayuresh@kathe.in) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id BE4B817209B for ; Mon, 5 Jan 2015 19:48:34 +0100 (CET) Date: Tue, 6 Jan 2015 00:18:33 +0530 From: Mayuresh Kathe To: freebsd-questions@freebsd.org Subject: Re: working with obj-c under freebsd! Message-ID: <20150105184832.GA1590@aio.kathe.in> References: <20150105160823.GA1080@aio.kathe.in> <20150105175949.GA972@aio.kathe.in> <20150105184133.GA1430@aio.kathe.in> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150105184133.GA1430@aio.kathe.in> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 18:48:38 -0000 On Tue, Jan 06, 2015 at 12:11:34AM +0530, Mayuresh Kathe wrote: > On Mon, Jan 05, 2015 at 11:29:50PM +0530, Mayuresh Kathe wrote: > > On Mon, Jan 05, 2015 at 09:38:24PM +0530, Mayuresh Kathe wrote: > > > i had asked this question before and was advised to install > > > the gnustep framework before trying out obj-c development > > > under freebsd. > > > > > > finally got the whole thing installed and tried to compile > > > the following simple objective-c program. > > > > > > #import > > > > > > int main (int argc, const char * argv[]) > > > { > > > @autoreleasepool { > > > NSLog (@"Programming is fun!"); > > > } > > > return 0; > > > } > > > > > > the compiler options used were as below; > > > clang -fobjc-arc main.m -o prog1 > > > > > > the compiler threw up the following error; > > > main.m:3:9: fatal error: 'Foundation/Foundation.h' file not found > > > #import > > > ^ > > > 1 error generated. > > > > > > what can i do to get the above resolved? > > > > i found the location of that file to be at; > > /usr/local/GNUstep/System/Library/Headers/Foundation/Foundation.h > > > > should i be pointing the LD_LIBRARY_PATH variable to that point too? > > don't know if that would work, gnustep and obj-c do have their own > > way of setting things up and getting things done. :) > > okay, got it to compile and work, find below contents of GNUmakefile; > GNUSTEP_MAKEFILES=/usr/local/GNUstep/System/Library/Makefiles > include $(GNUSTEP_MAKEFILES)/common.make > TOOL_NAME = mainapp > mainapp_OBJC_FILES = main.m > include $(GNUSTEP_MAKEFILES)/tool.make > > put it in the same directory as main.m and just issue gmake. > remember to edit config.make found at; > /usr/local/GNUstep/System/Library/Makefiles/ > to reflect the actual location of clang tools, i.e. /usr/bin/ also remember to set the environment variable GNUSTEP_SYSTEM_TOOLS to point to /usr/local/GNUstep/System/Tools ~mayuresh