Milton Woods wrote:
> The linker doesn't seem to be the problem.
> 
> Consider as an example the file src/TextCache.C which declares a
> global method 'findFit'. When compiled using gcc-3.2 on Redhat 9,
> the 'nm' program shows that the object file includes two 'findFit'
> symbols:
> 
> 00000366 t _GLOBAL__I__ZN9TextCache7findFitEP6Bufferi
> 00000000 T _ZN9TextCache7findFitEP6Bufferi
> 
> Both symbols are stored in the text section of the object file. When
> the same source file is compiled using gcc-3.3.1 on Cygwin, the
> object file includes three 'findFit' symbols:
> 
>          U __GLOBAL__D__ZN9TextCache7findFitEP6Bufferi
>          U __GLOBAL__I__ZN9TextCache7findFitEP6Bufferi
> 00000000 T __ZN9TextCache7findFitEP6Bufferi
> 
> The two global symbols are marked as undefined.
> 
> Perhaps there is a bug in gcc-cygwin, or else the syntax used to
> define 'findFit' as global is incorrect or outdated. Can anyone
> suggest other reasons or possible workarounds?

I find this very odd. 'findFit' is a member function of the TextClass 
class. How can it not be found? Baffling!

Can you use the '--line-numbers' option to 'nm'?

$ nm --demangle --line-numbers TextCache.o | grep findFit
00000464 t _GLOBAL__I__ZN9TextCache7findFitEP6Bufferi   
/home/angus/lyx/13x/build-xforms/src/../../src/bufferlist.h:38
00000000 T TextCache::findFit(Buffer*, int)     
/home/angus/lyx/13x/build-xforms/src/../../src/TextCache.C:75


-- 
Angus

Reply via email to