Page 1 of 2

Completely new to clipper and Advice Required

Posted: Thu Sep 07, 2017 11:47 am
by MkGomp
Hi All

I'm from Indonesia and I'm completely new to clipper and Harbour.

I've got this old clipper DOS program and I would like to run it into Windows 7 operating system, 32 & 64 bit.
I've read in a number of blog, posts, and forum that HMG would be able to convert old dos clipper program and be able to run it in any windows platform.

my old clipper program has:
- lots of .PRG,
- lots of .CH,
- lots of .LIB,
- one .RMK, and
- one .LNK .

Out of all .PRG files, only 1 .PRG that has "function main()"

My question is, would I be able to run this old dos clipper program by simply compiling 1 .PRG file which has function main()?

Regards,

Re: Completely new to clipper and Advice Required

Posted: Thu Sep 07, 2017 12:49 pm
by Rathinagiri
Yes. You can. However, do you have the source code for the external lib files also?

Re: Completely new to clipper and Advice Required

Posted: Thu Sep 07, 2017 1:02 pm
by dragancesu
Look in attachment

For clipper rmake need
.prg and .ch * programs and headers
.rmk - project
.lnk - files for link

For hmg need only .hbp - list of programs

Note: if you have LIB in .lnk beware, .lib is clipper library, hmg use .a library, it's not compatibile

Re: Completely new to clipper and Advice Required

Posted: Thu Sep 07, 2017 1:02 pm
by Anand
Hi MkGomp,

For running old Clipper prgs in 32bit OS, you just need to compile them in Harbour. HMG required when you want to make windows and use mouse events etc.

I did mine in following way,

make a clip.hbp text file which has all .prg file names from the .rmk file of Clipper.
run "hbmk2 clip.hbp" to compile

You must have harbour installed to have "hbmk2".

Finally as Rathinagiri Sir said, you will need the sources of the .lib used if you can not find the same / alternative in Harbour hb*.lib

Regards,

Anand

Re: Completely new to clipper and Advice Required

Posted: Thu Sep 07, 2017 2:09 pm
by serge_girard
Hello MkGomp,

Welcome from Belgium!

My colleagues allready explained how to compile old clipper prg. Converting them to Windows + HMG is yet another step!

Serge

Re: Completely new to clipper and Advice Required

Posted: Thu Sep 07, 2017 2:41 pm
by esgici
MkGomp wrote:
Thu Sep 07, 2017 11:47 am
Hi All

I'm from Indonesia and I'm completely new to clipper and Harbour.

I've got this old clipper DOS program and I would like to run it into Windows 7 operating system, 32 & 64 bit.
I've read in a number of blog, posts, and forum that HMG would be able to convert old dos clipper program and be able to run it in any windows platform.

my old clipper program has:
- lots of .PRG,
- lots of .CH,
- lots of .LIB,
- one .RMK, and
- one .LNK .

Out of all .PRG files, only 1 .PRG that has "function main()"

My question is, would I be able to run this old dos clipper program by simply compiling 1 .PRG file which has function main()?

Regards,
Hi MkGomp

Welcome wonderful world of HMG :)

As friends explained, you can easily (almost with zero modification) compile your old clipper programs and applications by Harbour (event without HMG) in order to building Windows application to run 32 and 64 bit environment :arrow:

Meaning of almost is: you can't use

- .LIB,
- .RMK and
- .LNK

But don't worry; .RMK and .LNK files are unnecessary, indeed you need use .hbm ( and some case .hbc ).

Regarding to .LIB: unfortunately almost you haven't any chance to use them, because Harbour don't support .LIB files, instead uses .a files :(

Exceptions are:

If you have source code of that .LIB files you can easily add its to your project

or

if you find an utility to convert .LIB files to .a files ( sadly I don't know ) you can use it.

Happy Harbour'ing and HMG'ing :D

Re: Completely new to clipper and Advice Required

Posted: Thu Sep 07, 2017 7:25 pm
by mol
The problems may occur when your old program uses strange libs which contain functions not implemented in harbour libs.

Re: Completely new to clipper and Advice Required

Posted: Fri Sep 08, 2017 1:49 am
by MkGomp
Thanks for the reply, folks. I'll try to compile it in the next few days.

Re: Completely new to clipper and Advice Required

Posted: Fri Sep 08, 2017 2:01 am
by MkGomp
Rathinagiri wrote:
Thu Sep 07, 2017 12:49 pm
Yes. You can. However, do you have the source code for the external lib files also?
Hi, Rathinagiri.

I don't think I have the source code for the .LIB files.
All I can see from the files in my LIB folders are: bunch of .LIB files, RTLINK.HLP, RTLINK.DAT, RTLINK.EXE, and then NT2US50.OBJ (which I remember the "previous programmer" said the most important file and must not be deleted)

Re: Completely new to clipper and Advice Required

Posted: Fri Sep 08, 2017 9:07 am
by dragancesu
Did you try to make a compilation? Are there any problems?

if the clipper program is visited by https://sourceforge.net/projects/harbour-project/files/ and click on Download harbor-3.0.0-win.exe (58.4 MB)

I'm not making trouble with the libraries, because it may be fine, look
clipper5 \ bin folder, you must have clipper.lib and several other libraries with the same creation date, a total of seven-eight
if you have some that are not part of the clipper then it can be a problem
or simpler: list and captions that you have in the clipper5 \ lib, so we'll see