This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: problem creating a static library
- From: Mike Stump <mrs at apple dot com>
- To: Danilo José <danilo dot guerrero at deimos-space dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 29 Sep 2004 12:24:54 -0700
- Subject: Re: problem creating a static library
- References: <009f01c4a64e$1e562b00$420216ac@deimosspace.com>
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.