This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem creating a static library


I forgot to say, We are doing this in 2.95.2 because we have as requirement
to work in that version and in the 3.1 version and above.

   The thing is that in the 3.1 version works without any problem. Without
any strange flag of compilation.

  Thanks a lot!
  Danilo
----- Original Message ----- 
From: "Mike Stump" <mrs@apple.com>
To: "Danilo José" <danilo.guerrero@deimos-space.com>
Cc: <gcc@gcc.gnu.org>
Sent: Wednesday, September 29, 2004 9:24 PM
Subject: Re: problem creating a static library


> On Sep 29, 2004, at 10:59 AM, Danilo José wrote:
> > Hello I am having a problem creating a static library with gcc 2.95.2.
> > In a
> > MacOSX system.
>
> > g++ -c -DMacintosh -O2 -fvtable-thunks -frepo -fno-implicit-templates
> > -I./..
> > /include -
>
> First, 2.95 is old...  You'll get better milage out of newer
> compilers...
>
> Second -frepo didn't work with apple provided g++ compiler for a while,
> so mixing the two will lead to heartache.  Second, using -frepo across
> a .a file need not work so well.
>
> Running with -v, and seeing if collect2 runs will tell you if -repo is
> going to work at all.  If it does, it will, if not, it won't.
>
>  From there, you can examine the .rpo files and see if and where the
> missing symbols are able to be defined.  If you flip them by hand
> (useful in the case collect2 isn't going to work, or you don't want to
> let the linker see the object files by hiding them in a .a file), you
> should be able to instantiate all the missing symbols.  Kinda gross,
> but you asked.
>
> I'd say, remove -frepo, remove -fno-implicit-templates, use gcc-3.1, or
> gcc-3.3 from apple, and presto, everything should just work.
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]