Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clipper on Pentium 4's 2

Status
Not open for further replies.

SM777

Technical User
Mar 7, 2001
208
GB
Clipper runs much slower on Pentium systems than on equivalent AMD systems. I believe this is to do with changes to P4's which deprecated the use of 16-bit apps.

Is there a way around this? Is it just a matter of using a better compiler / linker?

In another thread Xharbour is mentioned. Does that work?

What about Blinker etc.

At the moment I'm using clipper 5.3 with clipper tools and the basic rtlinker.


 
Hi,
I've been experimenting with xHarbour (from using the free Borland compiler & linker) and am very pleased with the results. Changes in the source are inevitable, as xH apps need a 'function Main()' declaration in the main app source, similar to C programs. That can be done by conditionally compiling in the extra lines using '#ifdef __HARBOUR__' (pre-defined) etc. as xHarbour is 'just' a spin-off of Harbour.
Pre-compiled binaries are available, but anonymous cvs access gets you the latest sources, so you can be always up to date. With a little help from the free newsserver at news.xharbour.org (fast!) I was able to compile the compiler(!!!) myself, without having ever written any real C program!
After this, it's just a matter of replacing the build batchfiles you use with Clipper, with ones pointing to the xHarbour compiler & libraries (much of CA-Tools3 & nanfor is included, free also!) and (included with Borland C) Linker, and a full 32 bit Windows-compatible app is generated. It wil still look like the plain old Clipper version but is about a zillion times faster.
There are also a few 'graphic libraries' available that give full Windows capabilities (form, controls, objects etc) to create true Windows apps.
Other benefits are:
- Fully OO enabled
- Unlimited string space and array sizes
- try/except handling
- full OLE support
- and much more I can't recall from memory

A commercially supported version, with more slick tools and some extra libraries (a.o. SQLRDD), is available from xHarbour.com, that uses the same sources as the free version (sourceforge cvs) A Delphi-like IDE is also in the works there.

I'm not a _big_ fan (yet) but I do like xHarbour a lot ;-) and definately think it's worth a try.

HTH
TonHu
 
Hi, TonHu

Agree 100% re Harbour/xHarbour. It is really quick and also solves the infernal locking up the cpu problem very nicely.

However I have so far been using it only for DOS apps - do you know of any source for sample progs for creating true Windows apps?

Personally I can read manuals till the cows come home but looking at a working program is a lot more efficient, so I am looking for a bit of a shortcut.

Jock
 
Haven't made a discision yet, but am looking at hwgui, minigui and whoo/what32. I almost switched to hwgui, but then 'discovered' that they put the '@ x,y say' parameters x and y in the 'Windows' order, meaning opposite to the Clipper order, so it actually turns out to '@ y,x say'. At that point I stopped converting my DOS app(s), and went into 'halt-mode'. I've to return/reset from shock yet :-(

From time to time a (new) discussion is started in the xharbour NG, and I read it with great interest.

Commercial installments (FWH, xHarbour.com) I'm not considering, as I don't have any paying customers any longer ;-) (Shut down because of lack of work/future)

The xHarbour.com offering should be based on Whoo/What32, so that may be a long term solution, but who(o) can be sure?
Whoo/What32 is a, quite low-level but complete, Windows based solution, AFAIK.

HTH
TonHu
 
Hi, TonHu

Thanks vm yr excellent insight. That is the place I got to, so I guess I will stick with FW for now and keep watching Harbour. I got a cust to pay for FW a couple of years ago, but don't have FWH either and Alaska is very costly.

Low level is not really what I am looking for. I need to ship the apps, not spend my days twiddling bits. And I have a lot of DOS clipper code that does the job already but just need to do it reliably under the various OS's collectively known as Windows.

Jock
 
I use xBase++ from Alaska and it is not too bad.

I converted an app that I was convinced couldn't be done, and the end users have ended up happy - and pretty much coexisting with the old Clipper version, although I did initially have an index issue... might have been nothing to do with the app though!

Haven't tried xharbour.

Martin

Regards

Griff
Keep [Smile]ing
 
Hi, GriffMG

Yes, I followed your posts re your conversion with interest and xBase++ does sound like a pretty good way to do the transition. It sounds better than FW for existing code and has some good support but as I say too pricey to do on my own nickel and so far haven't been able to convince any custs to give it a try.

Thanks for your input.

Jock
 
Point Taken.

If I had not had a client prepared to pay for the s/w I would not have upgraded to xBase either...

That said, the transition has gone well... if I'd done it a few years ago I might not be hooked on VFP now. On the other hand xBase would not have been the mature product it is now, and I might have been truely p'd off!

Horses for courses. Look on ebay for a cheap copy of xBase?

Regards

Griff
Keep [Smile]ing
 
Jock, GriffMG,

I saw ppl coming from xBase++ to xHarbour. xH has a few 'advantages' over xB, IMHO, one of the largest being: it's free ;-)
That is often also seen as a disadvantage, and why xHarbour.com has a reason for being there.

Another adv. is that most source can be recompiled with xH without much changes, as xB requires more. But that's just a first impression from a few years ago :-( I also had a few 'startup' problems with xH, the largest being getting xH compiled from CVS, using the Borland compiler, as I'm no C programmer (yet).

Jock,
If you want to save a nickel, try xH, and see if you can FW upgraded to 2.4 (what I read from NG posts, that should have FWH & sources included?)
The speedincrease alone makes it worth your time, use gtwvt instead of gtwin and your terminal look can be 'real' Windows, just the content is 80x25 character driven ;-) (sorry, just kiddin' ya) it also gives graphical possibilities, but I haven't explored that yet.

HTH
TonHu
 
TonHu

I'm with you - never tried xH. No speed advantage with xB - infact you have to mod code to get a speed that is close.

Mind you, DR-DOS 8 is now available - with support for FAT32 volumes - so just think how fast a clipper program would be in that on a Pentium 4 2ghz!

Martin

Regards

Griff
Keep [Smile]ing
 
I don't know why I stuck with plain clipper 5.2 and vanilla rtlink over the past few years. I wish I had discovered xHarbour early. It certainly does fly. A few tests on some of my code sees a 3x speed increase.

I have a few questions though.

1) Where is the support? I can only find an xH newsgroup.
2) What about long name support?
I did find a clipper function library a while ago called lfn which had functions such as lf_fcopy. Are there equivalents for xH?

That's about it!

xBase looks interesting too but pricey whilst xH is free.
 
1) Where is the support? I can only find an xH newsgroup.
2) What about long name support?
I did find a clipper function library a while ago called lfn which had functions such as lf_fcopy. Are there equivalents for xH?
1) That is the free support, on you can buy the commercial version that includes from 3 months up to a year of tech support. After that you can add support by paying again...

2) AFAIK, long filename support is included in all Windows & Linux version of xH, just the DJGPP, and probably Watcom32 incarnations (DOS) don't support LFN directly, _but_ I'm not sure about this point. Won't need the DOS compilers ever again I hope ;-)
LFN.LIB is needed and usable only in a dos-box of any Windows version as far as I have seen, but is does offer quite solid functions!

HTH
TonHu
 
Tonhu,
I recently downloaded the file from xHarbour and tried to access the news.xharbour.org but did not manage to find where you get the procedure in compiling the compiler.
Is there any chance you can put together the procedure you used when you compile the compiler?
Thanks.
John
PS Just like you I'm no C programmer and have limited knowledge on Clipper but can get around with some clipper code.

 
TonHu,

I went to the link to stated above and manage to get most of the item stated on the site exception for item 3 because for some reason my connection is not getting to cvs.xharbour.sourceforge.et when I'm using "CVS Checkout) so I just went to the server and download the source from there and extract the source to my c drive.

After completing all the instruction and make_b32.bat was executed I got the following error message on the make_b32.log

MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
bcc32 -c -Iinclude;source\compiler;source\macro -d -O2 -DHB_FM_STATISTICS_OFF -d -OS -O2 -5 -DSIMPLEX -oobj\b32\hbffind.obj source\common\hbffind.c
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
source\common\hbffind.c:
Error E2209 include\hbdefs.h 56: Unable to open include file 'stdarg.h'
Error E2209 include\hbdefs.h 57: Unable to open include file 'stdio.h'
Error E2209 include\hbdefs.h 58: Unable to open include file 'stdlib.h'
Error E2209 include\hbdefs.h 59: Unable to open include file 'string.h'
Error E2209 include\hbsetup.h 56: Unable to open include file 'limits.h'
Error E2209 include\hbdefs.h 69: Unable to open include file 'windows.h'
Error E2209 include\hb_io.h 60: Unable to open include file 'io.h'
Error E2209 source\common\hbffind.c 68: Unable to open include file 'ctype.h'
Error E2139 source\common\hbffind.c 106: Declaration missing ;
Error E2139 source\common\hbffind.c 107: Declaration missing ;
Error E2139 source\common\hbffind.c 108: Declaration missing ;
Error E2451 source\common\hbffind.c 164: Undefined symbol 'FILE_ATTRIBUTE_ARCHIVE' in function hb_fsAttrFromRaw
Error E2451 source\common\hbffind.c 165: Undefined symbol 'FILE_ATTRIBUTE_DIRECTORY' in function hb_fsAttrFromRaw
Error E2451 source\common\hbffind.c 166: Undefined symbol 'FILE_ATTRIBUTE_HIDDEN' in function hb_fsAttrFromRaw
Error E2451 source\common\hbffind.c 167: Undefined symbol 'FILE_ATTRIBUTE_READONLY' in function hb_fsAttrFromRaw
Error E2451 source\common\hbffind.c 168: Undefined symbol 'FILE_ATTRIBUTE_SYSTEM' in function hb_fsAttrFromRaw
Error E2451 source\common\hbffind.c 169: Undefined symbol 'FILE_ATTRIBUTE_NORMAL' in function hb_fsAttrFromRaw
Error E2451 source\common\hbffind.c 175: Undefined symbol 'FILE_ATTRIBUTE_ENCRYPTED' in function hb_fsAttrFromRaw
Error E2451 source\common\hbffind.c 176: Undefined symbol 'FILE_ATTRIBUTE_TEMPORARY' in function hb_fsAttrFromRaw
Error E2451 source\common\hbffind.c 177: Undefined symbol 'FILE_ATTRIBUTE_SPARSE_FILE' in function hb_fsAttrFromRaw
Error E2451 source\common\hbffind.c 178: Undefined symbol 'FILE_ATTRIBUTE_REPARSE_POINT' in function hb_fsAttrFromRaw
Error E2451 source\common\hbffind.c 179: Undefined symbol 'FILE_ATTRIBUTE_COMPRESSED' in function hb_fsAttrFromRaw
Error E2451 source\common\hbffind.c 180: Undefined symbol 'FILE_ATTRIBUTE_OFFLINE' in function hb_fsAttrFromRaw
Error E2451 source\common\hbffind.c 181: Undefined symbol 'FILE_ATTRIBUTE_NOT_CONTENT_INDEXED' in function hb_fsAttrFromRaw
Error E2451 source\common\hbffind.c 236: Undefined symbol 'FILE_ATTRIBUTE_ARCHIVE' in function hb_fsAttrToRaw
Error E2228 source\common\hbffind.c 236: Too many error or warning messages in function hb_fsAttrToRaw
*** 26 errors in Compile ***

** error 1 ** deleting obj\b32\hbffind.obj

Any ideas where I can get those missing files?

Any ideas how to resolve those "Decralation missing" and Undefine symbles"?

If you have the files or know the link to it, can you please send it to me on my email add: john.omana@mwkl.co.uk

Thanks in advance for your help.

Regards,
John
 
The files you are missing should be in bc5\include, AFAIK, haven't got my Clipper dev. env. at hand here ;-)

HTH
TonHu
 
Tonhu,

I manage to correct the configuration files (this is where the problem was).

The next question would be...how did you alter you batch to look for the xharbour compiler?

I have the following batch that I used to compile using clipper.

SET INCLUDE=h:\fmcs\clipper\INCLUDE
SET LIB=h:\fmcs\clipper\LIB
SET OBJ=h:\fmcs\clipper\OBJ
SET PLL=h:\fmcs\clipper\PLL
h:\fmcs\clipper\bin\clipper @bmcs.clp >bmcs.log
h:\fmcs\clipper\bin\clipper @bmcs1.clp >>bmcs.log
h:\fmcs\clipper\bin\rtlink file bmcs,bmcs1 >>bmcs.log

The first 2 lines is easy but what about the OBJ, PLL & the actual linking?

Regards,
John
 
TonHu & others,

Sorry I misread the instruction on the xharbour.

I manage to compile a simple program using bld_b32.bat.

Have any of you guys manage to compile multiple files similar to what you usually do using clipper wherein you put all the files that needed to be compile and call that file during compilation (i.e. clipper @bmcs.clp)? If so, can you please tell me how?

Thanks.
John
 
I'm using hbmake to create sort-of make files and compile using hbmake, try "hbmake /?" to check the parameters (hbmake file /ex ?) to create a file, and "hbmake file" to start compiling/linking. It works for me, after a bit of tweaking of "file", to assure that my main source is the exact first file in the compile/link-order.

HTH
TonHu
 
TonHu,

I followed the instruction found on hbmake.txt but get error "E0001 Statement not allowed outside of procedure or function".

Do I need to put function <program name>() to all files being called?

The way my application is set-up is that, it doesn't have function on each of the program file being called which is ok with clipper.

I also used Harbour <main program> but this is only produces C output code which is needed to compiled with the Harbour Virtual Machine (although I get at least 3 errors which I'm trying to resolve).

With the C output code inplace I tried using bld_b32.bat but get the following errors.

N:\FMCS\Bulks\UPDATE~1>bld_b32 bmcs
The system cannot find the path specified.
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
bmcs.c:
Error E2209 bmcs.c 6: Unable to open include file 'hbvmpub.h'
Error E2209 bmcs.c 7: Unable to open include file 'hbpcode.h'
Error E2209 bmcs.c 8: Unable to open include file 'hbinit.h'
Error E2258 bmcs.c 11: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 12: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 13: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 14: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 15: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 16: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 17: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 18: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 19: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 20: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 21: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 22: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 23: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 24: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 25: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 26: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 27: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 28: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 29: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 30: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 31: Declaration was expected in function HB_FUNC
Error E2258 bmcs.c 32: Declaration was expected in function HB_FUNC
Error E2228 bmcs.c 32: Too many error or warning messages in function HB_FUNC
*** 26 errors in Compile ***


Any ideas?

Regards,
John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top