On Saturday 22 March 2008 03:35:05 am David Arturo Macias Corona wrote:
> >You need to give link-time info to solve cross references by
>
> 'grouping' >the
>
> >harbour libs, this is done by simply adding the "-Wl,--start-group
> ><hblibs,...> -Wl,--end-group" options, eg:
> >
> > -Wl,--start-group -lhbvm -lhbpp -lhbrtl -lhbrdd -lrddfpt -lrddcdx
> >
> >-lrddntx -lhbhsx
> >
> > -lhbsix -lhbusrrdd \
> > -lhbmacro -lhbcommon -lhblang -lhbcpage \
> > -lhbdebug -lhbcplr -lhbpcre -lhbct -lhbnf \
> > -lhbtip -lxhb -Wl,--end-group -lhbclipsm
>
> Teo:
>
> Using your suggested form for link more than half of errors disappear,
> but other remain ( fmod, pow, exp, log, sqrt, ceil )
>
> Errors included below
>
> What more must I change ?
>
> David Macias
>
>
> /harbour803/harbour/lib//libhbvm.a(hvm.o): In function `hb_vmModulus':
> hvm.c:(.text+0x58c8): undefined reference to `fmod'
> /harbour803/harbour/lib//libhbvm.a(hvm.o): In function `hb_vmPower':
> hvm.c:(.text+0x59b1): undefined reference to `pow'
> /harbour803/harbour/lib//libhbrtl.a(math.o): In function `HB_FUN_EXP':
> math.c:(.text+0x7d7): undefined reference to `exp'
> /harbour803/harbour/lib//libhbrtl.a(math.o): In function `HB_FUN_LOG':
> math.c:(.text+0x90e): undefined reference to `log'
> /harbour803/harbour/lib//libhbrtl.a(math.o): In function `HB_FUN_SQRT':
> math.c:(.text+0xa48): undefined reference to `sqrt'
> /harbour803/harbour/lib//librddcdx.a(dbfcdx1.o): In function
> `hb_cdxSortNew':
> dbfcdx1.c:(.text+0x138af): undefined reference to `sqrt'
> dbfcdx1.c:(.text+0x138bd): undefined reference to `ceil'
> /harbour803/harbour/lib//librddntx.a(dbfntx1.o): In function
> `hb_ntxSortNew':
> dbfntx1.c:(.text+0xaff2): undefined reference to `sqrt'
> dbfntx1.c:(.text+0xb000): undefined reference to `ceil'
> dbfntx1.c:(.text+0xb048): undefined reference to `sqrt'
> dbfntx1.c:(.text+0xb050): undefined reference to `ceil'
> /harbour803/harbour/lib//libhbcommon.a(hbstr.o): In function `hb_numPow10':
> hbstr.c:(.text+0x44f): undefined reference to `pow'
> collect2: ld devolvió el estado de salida 1
David,
You need to link in the math lib, just add at the end of your link
sequence: -lm
BTW, for environments that use bash shells (like linux), harbour provides the
scripts:
hbcmp, hblnk, hbrun
those scripts allows you to easily compile, link and run respectively. e.g.:
hbcmp hello.prg // produces hello.o
hblnk hello.o // produces hello executable binary file,
// automatically includes all the needed libs.
hbrun hello.prg // executes the hello.prg
check the help (just call any of those scripts without arguments) for details.
best regards
Teo Fonrouge
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour