problem creating a static library
Mike Stump
mrs@apple.com
Wed Sep 29 22:53:00 GMT 2004
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.
More information about the Gcc
mailing list