I need some help with my first steps on harbour

625 views
Skip to first unread message

Fernando A

unread,
May 20, 2016, 5:41:58 PM5/20/16
to Harbour Users
Hello everybody!

I am completely new with harbour and today I still have some systems in clipper 5.1 and now I decided to try to move one of them to windows 7 64 bits.
I downloaded harbour-3.0.0-win.exe and then I installed.
I try to compile one program writing in console:


set path=%path%;D:\harbour\hb30\bin;d:\borland\bcc55\bin

hbmk2 menu2.prg -i d:\clipper5\include

Harbour 3.0.0 (Rev. 16951)
Copyright (c) 1999-2011, http://harbour-project.org/
Compiling 'menu2.prg'...
menu2.prg(26) Error E0020  Incomplete statement or unbalanced delimiters
menu2.prg(99) Error E0030  Syntax error "syntax error at 'WAPANTA'"
menu2.prg(267) Error E0030  Syntax error "syntax error at 'WAPAN'"

No code generated.
hbmk2: Error: Running Harbour compiler (embedded). 1
(D:\harbour\hb30\bin\harbour.exe) -n2 menu2.prg d:\clipper5\include.prg -i -oC:\
Users\FERNAN~1\AppData\Local\Temp\hbmk_h2f647.dir\ -id:\borland\bcc55\Include -i
D:\harbour\hb30\include -undef:.ARCH. -D__PLATFORM__WINDOWS -D__LITTLE_ENDIAN__
-D__ARCH32BIT_

But in clipper it works correctly.
One of cause of error is the instruccion "setea",  this instruccion is defined in one file named "clipper.ch"

Some idea?, thanks in advance!!!
Yours faithfully,
Fernando




Klas Engwall

unread,
May 21, 2016, 12:53:21 PM5/21/16
to harbou...@googlegroups.com
Hi Fernando,

> I am completely new with harbour and today I still have some systems in
> clipper 5.1 and now I decided to try to move one of them to windows 7 64
> bits.
> I downloaded harbour-3.0.0-win.exe and then I installed.
> I try to compile one program writing in console:*
>
> *set path=%path%;D:\harbour\hb30\bin;d:\borland\bcc55\bin*
>
> *hbmk2 menu2.prg -i d:\clipper5\include*
>
> *
> Harbour 3.0.0 (Rev. 16951)
> Copyright (c) 1999-2011, http://harbour-project.org/
> Compiling 'menu2.prg'...
> menu2.prg(26) Error E0020 Incomplete statement or unbalanced delimiters
> menu2.prg(99) Error E0030 Syntax error "syntax error at 'WAPANTA'"
> menu2.prg(267) Error E0030 Syntax error "syntax error at 'WAPAN'"

[...]

> But in clipper it works correctly.
> One of cause of error is the instruccion "setea", this instruccion is
> defined in one file named "clipper.ch"

To begin with, there are some version problems that need to be fixed:

Although Harbour 3.0.0 is labeled as the stable version it is very old.
All of us (almost) have migrated to the nightly 3.2.0dev version, which
is far superior.

It is also recommended to use the MinGW version of Harbour and not the
ancient BCC55 (that compiler is 16 years old!!!). MinGW is included in
the nightly download.

Then you setup the path to the comp\mingw\bin directory plus the
bin\win\mingw directory in the Harbour tree.

Also, make sure that there are no "competing" paths included in %path%
that will be found before the paths I mentioned. It is probably better
to put %path% at the end of the path string.

Referencing header files in the clipper5 tree can be dangerous because
the Harbour compiler might find old Clipper header files that are
incompatible. If there are any header files of your own writing in that
directory, copy them to a location where Harbour can find them without
setting up a path to Clipper. Harbour has its own collection of standard
header files that must be used instead of any Clipper header files.

I am not familiar with a clipper.ch file in the Clipper tree, so that is
probably one of your own header files. What is in it besides the "setea"
setting?

Next, check the lines in menu2.prg that the error messages mention.
There are apparently some syntax errors there.

Regards,
Klas

supria...@gmail.com

unread,
May 23, 2016, 1:46:11 AM5/23/16
to Harbour Users
Hi Klas ,

What is mngw advantages compared to borland 55 
Please ...help us , Can you share of configuration to compile some prg with several libraries with minigw

Thanks

Mel Smith

unread,
May 24, 2016, 3:03:58 PM5/24/16
to Harbour Users
There are a variety of C compilers available for download and evaluation on www.whosaway.com.

There is also a section dedicated to Harbour programmers where you can find current versions built under MinGW and also under a newer Borland variant.

-Mel Smith


Klas Engwall

unread,
May 24, 2016, 5:11:23 PM5/24/16
to harbou...@googlegroups.com
Hi Supriadi,

> What is mngw advantages compared to borland 55

As I said, BCC55 is 16 years old. In its heyday in the xHarbour
community it was available from a Borland web page called "The Museum".
It was later removed from the museum, Borland sold off their tools
division to Embarcadero, and if I remember the media reports correctly
Embarcadero has now abandoned the very foundation that the BCC family of
compilers was built on. So any other compiler is a better choice than
BCC55. The Harbour community has mostly standardized on the MinGW C
compiler although a few people use MSC and even fewer use one of the
Borland variants.

As I also said, the MinGW compiler is included in the nightly download
of the Harbour compiler, so all you need is already in the package.

> Please ...help us , Can you share of configuration to compile some prg
> with several libraries with minigw

Just set up the paths to the C compiler binaries and the Harbour
binaries. That is all. Do not set any environment variables. No matter
what C compiler you use, that is exactly what you should do, no more, no
less, regarding compiler setup.

For your projects, let hbmk2 set up all dependencies based on the
contents of the .hbp file for each project. Always specify libs using
their .hbc files only (*not* with -l for the lib path and -i for the
include path), so to use hbct, the Clipper Tools compatible lib, just
add "hbct.hbc" (without the quotes) in the .hbp file. That will make
hbmk2 set up both the library file and any header files automatically.

Likewise, to use the Nanforum Toolkit compatible lib, called hbnf, just
specify "hbnf.hbc" and everything will be taken care of.

Regards,
Klas

supria...@gmail.com

unread,
May 26, 2016, 12:21:15 AM5/26/16
to Harbour Users
Dear Klass

Thanks for the explanation about MNGW and BCC

Best Regard
spd

Pada Sabtu, 21 Mei 2016 04.41.58 UTC+7, Fernando A menulis:
Reply all
Reply to author
Forward
0 new messages