From owner-freebsd-questions@FreeBSD.ORG Fri Jun 29 06:33:12 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52E1F16A400 for ; Fri, 29 Jun 2007 06:33:12 +0000 (UTC) (envelope-from sameersmail@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.225]) by mx1.freebsd.org (Postfix) with ESMTP id 1083A13C483 for ; Fri, 29 Jun 2007 06:33:11 +0000 (UTC) (envelope-from sameersmail@gmail.com) Received: by nz-out-0506.google.com with SMTP id l8so282166nzf for ; Thu, 28 Jun 2007 23:33:11 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=ieHxPHCWSW5cqtDSiZnrbZjrIVW0d224t85N0YjI+5azT6NBNiLTrjT1XR2lmlktiA6Mk4OmdAlpjd1gsUPpYdiSQoR/mwUw64rkf9NC+CIICI8KQfdzSDoyDp+OogS0mYBX+4s3H6KYFmEcThfL9rH2f7K5Jo5ZTX7IRZJupsI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Jy0RHbzeGJPDlPUd1E96Zw61jhlxzOPzgSqbCzdjKU/G2/FkFJaVdqjEv9CILvlJrwS7J2PGxaggtsOtjwWDPw749lSJuF1OtL0TN/I7B2way2EX2PB14RspUVSjdz8Q+KIXyo/fiJxUIufjapJ0Bch6zQpNCH/9DrFnxWgfJGs= Received: by 10.114.174.2 with SMTP id w2mr2291534wae.1183098791370; Thu, 28 Jun 2007 23:33:11 -0700 (PDT) Received: by 10.115.77.6 with HTTP; Thu, 28 Jun 2007 23:33:11 -0700 (PDT) Message-ID: <6c4fb2280706282333h3a60fa61ncfab026a63f7b653@mail.gmail.com> Date: Fri, 29 Jun 2007 12:03:11 +0530 From: "sameer gupta" To: "sameer gupta" , freebsd-questions@freebsd.org In-Reply-To: <20070627153830.GC71331@slackbox.xs4all.nl> MIME-Version: 1.0 References: <6c4fb2280706270305i4543c1fbu29a014c645c4cee0@mail.gmail.com> <20070627153830.GC71331@slackbox.xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: editing the search path for '#include' preprocessor X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2007 06:33:12 -0000 thanks, however i would like to add more details of my problem: cd /usr/home/sameer/ gcc -o prog1 prog1.c -lelf -I /usr/local/include/libelf In file included from prog1.c:3: /usr/local/include/libelf/libelf.h:31:28: libelf/sys_elf.h: No such file or directory In file included from prog1.c:3: /usr/local/include/libelf/libelf.h:185: error: syntax error before '*' token /usr/local/include/libelf/libelf.h:185: warning: data definition has no type or storage class /usr/local/include/libelf/libelf.h:187: error: syntax error before '*' token /usr/local/include/libelf/libelf.h:187: warning: data definition has no type or storage class /usr/local/include/libelf/libelf.h:189: error: syntax error before '*' token /usr/local/include/libelf/libelf.h:189: warning: data definition has no type or storage class /usr/local/include/libelf/libelf.h:194: error: syntax error before '*' token /usr/local/include/libelf/libelf.h:194: warning: data definition has no type or storage class /usr/local/include/libelf/libelf.h:195: error: syntax error before '*' token /usr/local/include/libelf/libelf.h:195: warning: data definition has no type or storage class prog1.c: In function `main': prog1.c:28: error: syntax error before ';' token Compilation exited abnormally with code 1 at Fri Jun 29 17:15:34 :::even though the sys_elf.h exists under the folder i specified using the -I flag while compiling still my compiler cant find the header kindly suggest, regards, sameer On 6/27/07, Roland Smith wrote: > > On Wed, Jun 27, 2007 at 03:35:46PM +0530, sameer gupta wrote: > > hello, > > i want to add new search path's for including more directories for > header > > files, for that i need to edit the makefile that my gcc compiler uses, > > however i cant figure out where to find that file, kindly help..i'm a > newbie > > who has just started out > > You can set environment variables to help GCC find include files and > libraries in your shell's startup script. For include files you can set > CPATH, for libraries you'll need to set LIBRARY_PATH. See > http://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html > > Both can contain different paths separated by a colon (:). > > How to set environment variables depends on the shell you use. csh uses > the 'set' command, while sh and bash use 'export'. See your shell's > manual page for details. > > Roland > -- > R.F.Smith http://www.xs4all.nl/~rsmith/ > [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] > pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) > >