For Programmers: Free Programming Magazines  


Home > Archive > Clipper > April 2006 > Compiling a .prg into an .exe file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Compiling a .prg into an .exe file
carltondickson@gmail.com

2006-04-25, 6:55 pm

Hi,

I have some source code for an old program we use, clipper I think,
that ends in .prg

I would like to make some changes to the .prg file so it doesn't
require the users input to close the window when operations have been
done...then I need to generate a .exe file from that .prg file somehow.

I have tried using xharbour but this it is only a trial version and it
seems to include certain .h file that when I compile the resulting .c
file seems to throw up error messages.

I would like to know if there is a better way of getting an .exe from a
..prg
Does anyone have any ideas on this one at all?

gv

2006-04-25, 6:55 pm


<
> I have some source code for an old program we use, clipper I think,
> that ends in .prg
>


clipper xxx.prg
exospace fi xxx

where xxx is prg file .....


carltondickson@gmail.com

2006-04-25, 6:55 pm

Thanks for the reply but could we take a step back, sorry....
This command you have written above, whereabouts do I execute it?

Is this a command for the xharbour program or have you assumed that I
have some sort of clipper program already installed?

I think I over complicated what I wanted to try and achieve, I wanted
to go from .prg to .exe and at the moment I only have the source code
(.prg file)

Rshah

2006-04-25, 6:55 pm

hi,

do u have a ca-clipper completly package ?

If u have a ca-clipper 5.3v pelase set this enviroment.
SET PATH=C:\CLIPPER\BIN;C:\WINDOWS;C:\WINDOW
S\SYSTEM32
SET INCLUDE=C:\CLIPPER\INCLUDE
SET LIB=C:\CLIPPER\LIB
SET OBJ=C:\CLIPPER\OBJ

set this enviroment in autoexec.bat or write a this enviroment in batch
file and tun file. after u can compile this.

ragards,
rashesh

carltondickson@gmail.com

2006-04-25, 6:55 pm

To be honest I don't think we even have that...I will have to look but
if we do this will come in handy.
Are there no free methods in order to get to a .exe file from a .prg
file?

Patrick Mast

2006-04-25, 6:55 pm

Hello,

> I have some source code for an old program we use, clipper I think,
> that ends in .prg
> I would like to make some changes to the .prg file so it doesn't
> require the users input to close the window when operations have been
> done...then I need to generate a .exe file from that .prg file somehow.
> I have tried using xharbour but this it is only a trial version and it
> seems to include certain .h file that when I compile the resulting .c
> file seems to throw up error messages.


I'd suggest to give xHarbour Builder a try. xHarbour Builder lets you
simply drag and drop the PRG source into the xHarbour Builder Project
Builder (xBuildW.exe) and press the "Build now" button. This will
produce the executable file. BTW, it will be a real 32 bits app, not a
16 bits app that Clipper will generate.

See http://www.xHarbour.com/index.asp?p..._sub=3&show_i=1

If you have any further questions or comments, please do not hesitate
to contact me at Patrick.Mast@xHarbour.com.
--
Sincerely,

Patrick Mast,
xHarbour.com Inc.
http://www.xHarbour.com

carltondickson@gmail.com

2006-04-25, 6:55 pm

Hi Patrick,
I thought I recognised your name from somewhere...
I have tried to use this program you mention to create an .exe file and
managed to get it to work...but decided to hunt for a free solution if
possible...failing that I think we would have to get xharbour although
I would ask two things first...

1. I take it the evaluation message will go as we want the executable
program that is generated from our .prg to be fully automated and not
require the user to select 'ok'
2. part of my code reads...
delete file "staffb.mdx"
use staffb exclusive new
select staffb
@ 10, 1 say padc("Packing STAFFB.DBF", 78)
pack
@ 11, 1 say padc("Indexing STAFFB on STAFF_NO to STAFFB.MDX", 78)

index on staff_no tag "staffb"
close staffb

and the indexes that are generated by the old .exe are .mdx (which is
what I would like) but harbour generates .ntx, which from a bit of
research are more efficient, but unfortunately not what I want.
Is there a way to get .mdx files instead?

Klas Engwall

2006-04-25, 6:55 pm

Carlton (?),

>I would like to make some changes to the .prg file so it doesn't
>require the users input to close the window when operations have been
>done...then I need to generate a .exe file from that .prg file somehow.


If that is the only change you want to make, are you sure it isn't
just a matter of configuring the shortcut correctly? I may have
interpreted your question incorrectly, but it sounds like the user
exits the application but the console window stays on screen and has
to be closed by clicking the "X" button. If so, look for something
like "Close the window when the application terminates" in the
shortcut.

>I have tried using xharbour but this it is only a trial version and it
>seems to include certain .h file that when I compile the resulting .c
>file seems to throw up error messages.
>
>I would like to know if there is a better way of getting an .exe from a
>.prg


Assuming that you don't have the Clipper compiler and the tools that
come with it and for just compiling an existing .prg file you don't
need the commercial xHarbour version. Visit www.xharbour.org and
download the open source version. You will also need a C compiler, for
example Borland's free C++ Compiler version 5.5 plus a couple of other
things. I believe that all the info you need is available at the
xharbour.org website. Or you can ask here or at
news.xharbour.org/xharbour

Regards,
Klas

-------
klas dot engwall at engwall dot com

http://www.engwall.com/clipper/

The LFN Library for Clipper
The LanMan Library for Clipper
The NFPAT1A Timeslice release patch for the Nanforum Toolkit
carltondickson@gmail.com

2006-04-26, 3:55 am

Thanks...I am downloading the compiler right now and will visit the
website you mentioned too.
Thanks for your help so far guys, not that much info on clipper out
there so your answers are much appreciated.

carltondickson@gmail.com

2006-04-26, 3:55 am

Hi guys,
Unfortunately I can not post on the newsgroups but I was hoping someone
could advise me on what I need to do after downloading and configuring
Borland free compiler (ilink.cfg and bcc55.cfg files done) and the
xharbour program, I added this path to the bcc55.cfg file
(-I"C:\xharbour\include") so borland can access the harbour
libraries...is this the correct thing to do?

I have a .prg file and need to get it in the format of .exe
I have tried the command...

C:\xharbour\bin>harbour INDXROTA.PRG

But this just generates a .C file.
I try to compile this using borland but it generate an .obj file
instead of an .exe

I am slightly about what the next step is in order to get to
..exe from .prg?

Does anyone have any ideas for what I should try.

Ross McKenzie

2006-04-26, 3:55 am

On 26 Apr 2006 01:24:20 -0700, carltondickson@gmail.com wrote:

>Hi guys,
>Unfortunately I can not post on the newsgroups but I was hoping someone
>could advise me on what I need to do after downloading and configuring
>Borland free compiler (ilink.cfg and bcc55.cfg files done) and the
>xharbour program, I added this path to the bcc55.cfg file
>(-I"C:\xharbour\include") so borland can access the harbour
>libraries...is this the correct thing to do?
>
>I have a .prg file and need to get it in the format of .exe
>I have tried the command...
>
> C:\xharbour\bin>harbour INDXROTA.PRG
>
>But this just generates a .C file.
>I try to compile this using borland but it generate an .obj file
>instead of an .exe
>
>I am slightly about what the next step is in order to get to
>.exe from .prg?
>
>Does anyone have any ideas for what I should try.
>


Carlton.

Based upon your earlier postings, you have a Dbase 4 .prg file.
Proceeding with your current path of enquiry will not produce a dbase
4 compatible solution.

The generic steps from .prg to .exe involve a compiler to process the
..prg into a .obj file and then a linker to combine the .obj with the
language's library files to produce the .exe file. If working with the
Clipper language you would need the Clipper compiler and a compatible
linker, eg PLink, Blinker, Exospace or others.

Regards,

Ross McKenzie
ValuSoft
Melbourne Australia

valusoft AT optusnet DOT com DOT au
Ron Pinkas

2006-04-26, 6:55 pm

> I added this path to the bcc55.cfg file
> (-I"C:\xharbour\include") so borland can access the harbour
> libraries...is this the correct thing to do?


No, the Borland config files should have only the path to the borland
folders.

> I have a .prg file and need to get it in the format of .exe
> I have tried the command...
>
> C:\xharbour\bin>harbour INDXROTA.PRG
>
> But this just generates a .C file.
> I try to compile this using borland but it generate an .obj file
> instead of an .exe


Use:

1. Copy INDXROTA to \xharbour\tests
2. bld_b32.bat INDXROTA

That will get you INDXROTA.exe

> I am slightly about what the next step is in order to get to
> .exe from .prg?


See above.

> Does anyone have any ideas for what I should try.


I'd consider hiring a programmer familiar with the steps involved in
compiling source module into an exe.

Ron


Klas Engwall

2006-04-26, 6:55 pm

>Unfortunately I can not post on the newsgroups

Ah, you are posting from Google. That means that you have no access to
any private news servers. A real news reader such as Forté Free Agent
or even Outlook Express will take care of that.

>but I was hoping someone
>could advise me on what I need to do after downloading and configuring
>Borland free compiler (ilink.cfg and bcc55.cfg files done) and the
>xharbour program,


[...]

I see that Ron answered compiler setup questions.

But right now you have a more serious problem than how to set up
xHarbour to compile your .prg file. I didn't read enough of the
message where you posted a code snippet, so I didn't see the .mdx file
requirement that Ross spotted after my latest suggestions. Sorry.

So, is .mdx an absolute requirement? If it is you will unfortunately
have to search elsewhere for a solution. There is no .mdx RDD for
xHarbour, and there seems to be no real demand for one either so it
isn't very likely that one will be written. There is .cdx, which is
multi-tag, and now there is also multi-tag .ntx.

You mentioned one .prg file, which sems to indicate that your
application is a rather small one. Would it be possible for you to
switch to one of the other RDDs? Or is this just one small piece in a
larger project?

Regards,
Klas

-------
klas dot engwall at engwall dot com

http://www.engwall.com/clipper/

The LFN Library for Clipper
The LanMan Library for Clipper
The NFPAT1A Timeslice release patch for the Nanforum Toolkit
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com