freepooma-devel
[Top][All Lists]
Advanced

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

RE: [pooma-dev] gcc


From: Julian C. Cummings
Subject: RE: [pooma-dev] gcc
Date: Wed, 6 Jun 2001 23:18:09 -0700

Dave,

My understanding is that gcc does not perform
prelinking for template closure the way the KCC
and SGI compilers do, unless things have changed
with gcc 3.0.  Also, gcc can be used to build
shared libraries by using the -shared flag, but
you should use ar to build static libraries.

Julian C.


> -----Original Message-----
> From: Jeffrey Oldham [mailto:address@hidden
> Sent: Wednesday, June 06, 2001 12:21 PM
> To: Dave Nystrom
> Cc: pooma-dev; John Hall; Jean Marshall; Don Marshall
> Subject: Re: [pooma-dev] gcc
>
>
> On Wed, Jun 06, 2001 at 11:03:19AM -0600, Dave Nystrom wrote:
> > Can someone explain to me how gcc handles template
> instantiations.  I would
> > like to try using the new gcc 3.0 snapshot to build our
> applications on my
> > new laptop which is running RedHat 7.1.  I have several
> questions which I
> > will need to resolve in order to build our stuff with gcc.  I
> assume that I
> > need to invoke the gcc C++ compiler by using g++.  I am very experienced
> > using KCC.  With KCC, we actually use KCC on the command line
> to build both
> > the library and the executable.  When we build the library, we add lower
> > level libraries to the end of the command line so that KCC will perform
> > library closure and not have the prelinker instantiate
> functions or classes
> > that have already been instantiated in lower level libraries
> that we will be
> > linking against.  Does gcc have any support for this sort of
> thing?  With
> > KCC, or any EDG based compiler, files are first compiled without
> > instantiating any templates and a database is constructed which
> tells the
> > compiler what templates can be instantiated in any given
> translation unit.
> > Then the prelinker uses this database and it's knowledge of
> what templates
> > need to be instantiated to assign templates to a translation
> unit and then
> > that translation unit is recompiled.  Does gcc handle template
> instantiation
> > differently and if so, how?  Does gcc have any support
> analagous to the KCC
> > one instantiation per object capability?  Does gcc have support for
> > precompiled headers?  Should I use ar and ld on the command
> lines to build
> > the library and executable respectively or should I use g++?  How do I
> > use/build shared libraries with gcc?  Does gcc support the
> -rpath option or
> > something similar that allows you to build the shared library
> paths into the
> > executable?
>
> Use g++ to compile C++ programs.  gcc 3.0 documentation (including
> g++) is available using a command like
>
>   info -f ${HOME}/gcc-install/info/gcc.info,
>
> where ${HOME}/gcc-install indicates the directory where gcc is
> installed.  When using info(1), many of the regular emacs commands are
> available.
>
> Mark Mitchell better understands gcc's template instantiation.
>
> Gcc does not provide support for precompiled headers.  Mark has been
> looking for a sponsor to pay for adding this feature.  Contact him if
> you know of an interested company.
>
> Using g++ for archiving and linking should suffice.  I personally let
> gcc or g++ figure out what linker to use.
>
> Regarding building shared libraries, see
> http://gcc.gnu.org/fom_serv/cache/40.html.  To use shared libraries,
> compile by specifying the directory path using a `-L<directory>'
> command-line option.  Then I set LD_LIBRARY_PATH (or
> LD_LIBRARYN32_PATH on Irix6.5) to specify the location of the shared
> libraries.  If this does not suffice and you want to pass `-rpath' to
> the linker, pass `-Wl,-rpath' to g++.
>
> Thanks,
> Jeffrey D. Oldham
> address@hidden
>

reply via email to

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