FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveLinux / FiveDroid (Android) xharbour-0.99.0.rpm + gcc compile & link error.
Posts: 109
Joined: Sun Nov 13, 2005 12:40 AM
xharbour-0.99.0.rpm + gcc compile & link error.
Posted: Wed Jan 11, 2012 06:22 AM

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.?

FWH User

FWPPC User

FWLinux User
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: xharbour-0.99.0.rpm + gcc compile & link error.
Posted: Wed Jan 11, 2012 01:12 PM

Yunbg,

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 109
Joined: Sun Nov 13, 2005 12:40 AM
Re: xharbour-0.99.0.rpm + gcc compile & link error.
Posted: Sun Jan 15, 2012 05:44 AM

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)

FWH User

FWPPC User

FWLinux User
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: xharbour-0.99.0.rpm + gcc compile & link error.
Posted: Sun Jan 15, 2012 01:01 PM
This is the buildx.sh for xHarbour and FiveLinux:

buildx.sh
Code (fw): Select all Collapse
# ./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
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion