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



yes, well, I was doing tests trying new flags.

   This problem, started to happen before using any of those flags.

   In fact I am using the version of the 2.95.2 gcc compiler that apple has,
the gcc-937.2

   My workmate is telling me that maybe is because the flags of compilations
of the objects.

   It is happening something really strange.

   I see in the library three references to the method that it says it is
undefined.
nm ../lib/Mac_OS_10/libgol.a | grep
___Q23golt13ObjAppendList1ZPQ23gol14CalcBinderDatalPCPB1 | c++filt
         U gol::ObjAppendList<gol::CalcBinderData *>::ObjAppendList(long,
gol *const *)
         U gol::ObjAppendList<gol::CalcBinderData *>::ObjAppendList(long,
gol *const *)
00000d30 S gol::ObjAppendList<gol::CalcBinderData *>::ObjAppendList(long,
gol *const *)


nm ObjAppendListTypes.o | grep
___Q23golt13ObjAppendList1ZPQ23gol14CalcBinderDatalPCPB1 | c++filt

00000d30 S gol::ObjAppendList<gol::CalcBinderData *>::ObjAppendList(long,
gol *const *)

nm StdError.o | grep
___Q23golt13ObjAppendList1ZPQ23gol14CalcBinderDatalPCPB1 | c++filt
         U gol::ObjAppendList<gol::CalcBinderData *>::ObjAppendList(long,
gol *const *)

I do not find any reference inside StdError.o to ObjAppendlist, I do not
know how is it calling it, because therer isn´t any call.



----- 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]