Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jun 1996 11:00:31 +0100 (GMT-1)
From:      af@biomath.jussieu.fr
To:        tessarmd@eve.cs.uwec.edu (MATTHEW TESSAR)
Cc:        freebsd-questions@freebsd.org
Subject:   Re: gnu g++ directory for common classes
Message-ID:  <199606131000.LAA05258@garfield.biomath.jussieu.fr>
In-Reply-To: <Pine.OSF.3.91.960612210559.5846A-100000@eve.cs.uwec.edu> from "MATTHEW TESSAR" at Jun 12, 96 09:12:40 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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 :-]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606131000.LAA05258>