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

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

Postby yunbg1 » Wed Jan 11, 2012 6: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
yunbg1
 
Posts: 107
Joined: Sun Nov 13, 2005 12:40 am
Location: Winnipeg Canada

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

Postby Antonio Linares » Wed Jan 11, 2012 1: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

Postby yunbg1 » Sun Jan 15, 2012 5: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
yunbg1
 
Posts: 107
Joined: Sun Nov 13, 2005 12:40 am
Location: Winnipeg Canada

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

Postby Antonio Linares » Sun Jan 15, 2012 1:01 pm

This is the buildx.sh for xHarbour and FiveLinux:

buildx.sh
Code: Select all  Expand view  RUN
# ./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
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveLinux / FiveDroid (Android)

Who is online

Users browsing this forum: No registered users and 2 guests