Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Undefined symbols with dynamic library



On Dec 5, 2005, at 7:32 PM, Ann W. Harrison wrote:
I'm porting a product that currently runs on a variety
of Unixes and Linux and am having trouble using a
dynamic library that is part of the product with its
executables.  The current symptom is two undefined
symbols:

gds(long double *,...)(float, int, long long)
gds(float, long double,...)(...)


The "gds" is a prefix we use, but never alone. There is no reference to "long double" anywhere in the code.

I get that symptom when I link with our shared library
if it is linked with a flat namespace, two-level namespace
with entry points marked as __attribute__((visibility="default")
and the library linked to hide other attributes, or with
an exported symbols list.  I don't see the undefined
symbols if I compile and link the shared library with
visibility default, though that produces (numerous)
other problems.

Any clues?

If you use "nm" on your library, pipe the output to "less", you can search for the symbol definition (/gds$ or /U.*gds$), and then scroll up to find the object file name above it, which will tell you the name of the source file where it's being referenced (U or u for "undefined").


-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Unix-porting mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/unix-porting/email@hidden

This email sent to email@hidden
References: 
 >Undefined symbols with dynamic library (From: "Ann W. Harrison" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.