Re: Undefined symbols insanity after upgrading to Xcode 2.1...
Re: Undefined symbols insanity after upgrading to Xcode 2.1...
- Subject: Re: Undefined symbols insanity after upgrading to Xcode 2.1...
- From: Sailesh Agrawal <email@hidden>
- Date: Tue, 26 Jul 2005 13:09:49 -0700
Dave Thorup wrote:
OK, I've just upgraded all of our library projects to Xcode 2.1 and
now I'm trying to get an application that uses those libraries to
run. The problem is that now I'm running into undefined symbols and
I can't figure out why. I'm using Xcode 2.1 and building with GCC
3.3 for everything. The following symbols for three methods are
undefined:
__ZThn4_N17CStratoFilterBase12StratoNotifyEPK17IStratoDataSourcelPv
__ZThn4_N17CStratoFilterBase21StratoAddedDataSourceEPK17IStratoDataSourc
e
__ZThn4_N17CStratoFilterBase23StratoRemovedDataSourceEPK17IStratoDataSou
rce
They happen to be the last three public methods declared in the
header file for the class. There are no problems with the rest of
the methods in the class. Here is how they are declared:
virtual IStratoError * StratoAddedDataSource(
const IStratoDataSource * pSource );
virtual IStratoError * StratoRemovedDataSource(
const IStratoDataSource * pSource );
virtual IStratoError * StratoNotify(
const IStratoDataSource * pSource, long nCode, void * pData );
If I use nm to view the global symbols in the .o file then I find the
symbols there as I would expect:
000084f0 S
__ZThn4_N17CStratoFilterBase12StratoNotifyEPK17IStratoDataSourcelPv
000084d0 S
__ZThn4_N17CStratoFilterBase21StratoAddedDataSourceEPK17IStratoDataSourc
e
000084e0 S
__ZThn4_N17CStratoFilterBase23StratoRemovedDataSourceEPK17IStratoDataSou
rce
The capital "S" indicates that these symbols are exported globally.
I think you're running into the same problem I've been having for a
while now. I had symbols that were obviously being exported from a
static library but I would still get link errors. Strangely, moving
those functions from one file to another file would sometimes fix the error.
It turns out that the reason was the order I was linking my libraries. I
just had to move the library that was the source of the error down a bit
in the link order and the problem went away.
good luck
Sailesh
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden