Page 1 of 1

xharbour-0.99.0.rpm + gcc compile & link error.

Posted: Wed Jan 11, 2012 6:22 am
by yunbg1
Hi all.

i have linux kernel redhat 9.

xharbour-0.99.fc1.0.rpm install.


redhat 9 + gcc + xharbour-0.99.fc1.0

test.prg
////////////////////////////////////////////

func main()

? "test say....."

return
////////////////////////////////////////////
compile..

#harbour test.prg
~Done.

#gcc test.o -otyest.c -I /usr/include/xharbour

...
error..........
.....

undefined reference to 'hb_vm_Symbolinit_TEST':
undefined reference to 'hb_vmProcessSymbolls'
undefined reference to 'hb_vmExecute'
....
....
collect2 : ld returned 1 exit status

How to compile option GCC.?

Re: xharbour-0.99.0.rpm + gcc compile & link error.

Posted: Wed Jan 11, 2012 1:12 pm
by Antonio Linares
Yunbg,

Could you use Harbour instead of xHarbour ? Then you could easily build using Harbour hbmk2 app

Re: xharbour-0.99.0.rpm + gcc compile & link error.

Posted: Sun Jan 15, 2012 5:44 am
by yunbg1
Thank you.
Antonio Linares

I have no idea.
you make simple xbuild.sh sent me please.

My configure in linux.

HB_BIN_INSTALL=/usr/bin
HB_LIB_INSTALL=/usr/xharbour/lib
HB_INC_INSTALL=/usr/xharbour/include
...

xharbour 0.99.0 + gcc + linux(red hat 9)

Re: xharbour-0.99.0.rpm + gcc compile & link error.

Posted: Sun Jan 15, 2012 1:01 pm
by Antonio Linares
This is the buildx.sh for xHarbour and FiveLinux:

buildx.sh

Code: Select all

# ./buildx.sh
 
clear
 
if [ $# = 0 ]; then
   echo syntax: ./buildx.sh file [options...]
   exit
fi
 
echo compiling...
./../../xharbour/bin/harbour $1 -n -I./../include -I./../../xharbour/include $2
 
echo compiling C module...
gcc $1.c -c -I./../include -I./../../xharbour/include `pkg-config --cflags gtk+-2.0`
 
echo linking...
gcc $1.o -o$1 -L./../lib -L./../../xharbour/lib `pkg-config --libs gtk+-2.0` `pkg-config --libs libglade-2.0` `pkg-config --libs libgnomeprintui-2.2` -Wl,--start-group -lfivex -lfivec -lcommon -lvm -lrtl -lrdd -lmacro -llang -lcodepage -lpp -ldbfntx -ldbfcdx -ldbffpt -lhbsix -lhsx -lpcrepos -lusrrdd -ltip -lct -lcgi -lgtnul -lgtstd -lgtcgi -lgtcrs -lhbodbc -ldebug -lm -lgpm -lncurses -Wl,--end-group
 
rm $1.c
rm $1.o
 
echo done!
./$1