From owner-freebsd-questions Thu Jun 13 02:01:00 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA07200 for questions-outgoing; Thu, 13 Jun 1996 02:01:00 -0700 (PDT) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id CAA07185 for ; Thu, 13 Jun 1996 02:00:56 -0700 (PDT) From: af@biomath.jussieu.fr Received: from mekong.biomath.jussieu.fr (mekong.biomath.jussieu.fr [134.157.72.87]) by shiva.jussieu.fr (8.7.5/jtpda-5.2) with SMTP id LAA17474 ; Thu, 13 Jun 1996 11:00:50 +0200 (METDST) Received: from garfield.biomath.jussieu.fr (garfield) by mekong.biomath.jussieu.fr (5.67b/jn930126+af960507(mailhost)) at Thu, 13 Jun 1996 11:00:32 +0100 Received: from (af@localhost) by garfield.biomath.jussieu.fr (8.7.5/jtpda-5.2) id LAA05258 ; Thu, 13 Jun 1996 11:00:31 +0100 (GMT-1) Message-Id: <199606131000.LAA05258@garfield.biomath.jussieu.fr> Subject: Re: gnu g++ directory for common classes To: tessarmd@eve.cs.uwec.edu (MATTHEW TESSAR) Date: Thu, 13 Jun 1996 11:00:31 +0100 (GMT-1) Cc: freebsd-questions@freebsd.org In-Reply-To: from "MATTHEW TESSAR" at Jun 12, 96 09:12:40 pm X-Mailer: ELM [version 2.4 PL24] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > Hello FreeBSD, > > I have been running FreeBsd 2.10 for a few months and am very pleased > witht the OS and this questions group. > > WHat I am trying to do is set up a common directory where classes can be > included by any user of my system. Example: > > #include "array.cc" > > .. > .. > .. > > rather than: > > #include "/usr/local/include/array.cc" When compiled as an "extra" compiler, gcc will go search for its include files in /usr/local/include. Since gcc is the native compiler in FreeBSD, it only goes looking in the standard /usr/include directory. Easiest choice: tell your users to aways add a -I/usr/local/include in the cc command line option in their makefiles Alternatively, you can rebuild gcc from the GNU sources with the default setup of searching /usr/local/include (that's what "configure" chooses by default). Note that this compiler should *not* be used for system tasks as kernel generations. Use /usr/bin/cc. What I did on my system is removing /usr/bin/gcc (which is a hard link to /usr/bin/cc) so that "cc" invokes the standard compiler and "gcc" the one I have built from GNU sources (which resides in /usr/local/{bin, include, lib, ...}) Good luck, _A_ -- Alain FAUCONNET Ingenieur systeme - System Manager AP-HP/SIM Public Health 91 bld de l'Hopital 75013 PARIS FRANCE Medical Computing Research Labs Mail: af@biomath.jussieu.fr Tel: (+33) 1-40-77-96-19 Fax: (+33) 1-45-86-80-68 I've RTFMed. It says: "Refer to your system administrator" But... I *am* the system administrator :-]