[Leaplist] Harbour 2.0 on YOUR Linux

Phil Barnett philb at philb.us
Thu Dec 24 04:44:15 EST 2009


The builds for different platforms are not finished yet, but you can compile
Harbour for any Linux platform as follows:

$cd ~
$svn export
https://harbour-project.svn.sourceforge.net/svnroot/harbour-project/tags/harbour-2.0.0
$su
$cd harbour-2.0.0
$ make install

I found that I had to do the following, not sure if it's because I'm running
on a 64bit platform...

$ cd /etc/ld.so.conf.d/
$ echo "/usr/lib/harbour" > harbour.conf
$ echo "/usr/local/lib64/harbour" >> harbour.conf
$ ldconfig

I'll submit that as a bug, but it's an easy one to get around.

To test it, type:

$ cd ~/harbour-2..0.0/tests
$ hbmk2 hello.prg
$ ./hello

You should see 'Hello world!' on screen.

reference link:
http://www.harbour-project.org/samples/HowToBuildOnLinux.html

Once Harbour is installed on your computer, it can run .prg files directly
(a script engine) by putting a shebang line at the top of the program, ie:

$ cat foo.prg
#!/usr/bin/hbrun
function main()
? "Hello, World!, This is a script !!! :-)"
return nil

$ chmod +x foo.prg
$ ./foo.prg

Hello, World!, This is a script !!! :-)

Also, there is hbmk2, which is a make engine that compiles and links your
code into an executable:

$ cat foo.prg
function main()
? "Hello, World!"
return nil

$ hbmk2 foo

hbmk2: Processing configuration: /usr/local/bin/hbmk.cfg
Harbour 2.0.0 (Rev. 13372)
Copyright (c) 1999-2010, http://www.harbour-project.org/
Compiling 'foo.prg'...
Lines 3, Functions/Procedures 1
Generating C source output to 'foo.c'... Done.

$ ls -l foo
-rwxrwxr-x 1 philb philb 8233 2009-12-24 04:00 foo

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.leap-cf.org/pipermail/leaplist/attachments/20091224/872d1266/attachment.html


More information about the Leaplist mailing list