R: [Gdal-dev] static libraries revamped (was: new build strategy for org/orgsf_frmts/)

Amici Alessandro alessandro_amici at telespazio.it
Thu Jul 24 08:21:18 EDT 2003


Norman,

> Alessandro Amici writes:
> > 
> > i investigated a bit what's going on, but i still don't understand what
is the 
> > difference between cygwin and the other gnu targets.
> 
> I think that it is related to Windows DLLs being different then Unix
dynamic
> libraries. 
> ie all references for an object have to be resolvable before a object is
used
>
> This is often described as 'link order' matters on Win32

beware that the problem appears _before_ the dll build. ogr.o is not
supposed to be
a dll, it should just be a big object file that contains the symbols of
other object
files. undefined referenceies are ok, both on unix and on windows.
furthermore all problematic symbols i looked at are classified as 'W' by nm,
not 'U'.
  
> I am hoping to get some time to investigate this within a couple of days

FYI, the problematic symbols (i.e. _ZN8OGRCurveD0Ev) refer to the
destructurs
of a class (i.e. OGRCurve). they are not defined or declared anywhere in the
code.
note that sometimes the error is raised by the time another class
OGRLineString
(with OGRCurve as a parent) is being resolved.

some examples:
$ ld -r -o ogr.o ogrcurve.o

$ ld -r -o ogr.o ogrcurve.o ogrmultipoint.o

$ ld -r -o ogr.o ogrcurve.o ogrlinestring.o
ogrlinestring.o(.eh_frame+0x688):ogrlinestring.cpp: reloc refers to symbol
`.text$_ZN8OGRCurveD0Ev' which is not being output
ogrlinestring.o(.eh_frame+0x6b4):ogrlinestring.cpp: reloc refers to symbol
`.text$_ZN8OGRCurveD1Ev' which is not being output

$ ld -r -o ogr.o ogrlinestring.o ogrcurve.o
ogrcurve.o(.eh_frame+0x688):ogrcurve.cpp: reloc refers to symbol
`.text$_ZN8OGRCurveD1Ev' which is not being output
ogrcurve.o(.eh_frame+0x6b0):ogrcurve.cpp: reloc refers to symbol
`.text$_ZN8OGRCurveD0Ev' which is not being output

i'm puzzled!

thanks, for looking into the issue. i'll do a couple more thing myself.
alessandro



More information about the Gdal-dev mailing list