Board index » delphi » Making .exe files

Making .exe files

Hi outta there,
Im using Turbo Pascal 6.0 for DOS and I want to build a .exe-File of my
Pascal-Program,
so I can run it without Turbo Pascal 6.0.

I dont know what has to be in the makefile.

Please tell me, how I can make a executable File from my Source.

Thanx
Wolfgang
E-Mail: ziss...@kmm.de

 

Re:Making .exe files


Quote
Wolfgang Zi?ler wrote in message <36C729AE.8CCC3...@kmm.de>...
>Hi outta there,
>Im using Turbo Pascal 6.0 for DOS and I want to build a .exe-File of my
>Pascal-Program,
>so I can run it without Turbo Pascal 6.0.

>I dont know what has to be in the makefile.

>Please tell me, how I can make a executable File from my Source.

>Thanx
>Wolfgang
>E-Mail: ziss...@kmm.de

This is from the posted FAQ's that you should read before asking a question.
Enjoy.

* How do I make EXE files with Turbo Pascal?

In Turbo Pascal, in the compile menu, make sure that the COMPILE TO option
is
set to COMPILE TO DISK. Whewn you compile, make or build your program then
you
will create the file XXX.EXE, where XXX is the name of your .PAS file.

--

Jeff Freeman
cakew...@voicenet.com
http://www.voicenet.com/~cakewalk/

Re:Making .exe files


Quote
Wolfgang Zi?ler wrote:

> Hi outta there,
> Im using Turbo Pascal 6.0 for DOS and I want to build a .exe-File of my
> Pascal-Program,
> so I can run it without Turbo Pascal 6.0.

> I dont know what has to be in the makefile.

> Please tell me, how I can make a executable File from my Source.

First, if you are only using Pascal sources, you don't need a makefile.
TP knows how to make complex programs through the using mechanism.
Makefiles are only required if non-Pascal sources are to be used
(like assember files, linked in with {$L yourfile.obj}).

If you want to use makefiles, you have to call tpc or tpcx
(the latter uses extended memory during compiling, therefore
it can handle larger programs). IIRC (don't have my docs here),
the switch /m is needed for appropriately making the sources.
You only need to give the dependancies for files which
themselves depend on other files (I'm not sure if the compiler
consideres the date of the .obj linked in with $L; however,
it doesn't know how to produce that. Also, make doesn't know
how to determine dependancies itself (there's no "backchannel"
from TP to make to tell make which units are used), so you have
to give all dependancies which need further treatment of make
(f.ex. UNIT1.PAS links in UNIT1.OBJ, which comes from UNIT1.ASM,
you must explicitly tell make about that dependance. The rules
could look like this:

myprog.exe: myprog.pas unit1.tpu
        tpc /m myprog.pas
# note: no dependancy on an unit2.tpu needs to be given,
# if that does not depend on more than it's Pascal source

unit1.tpu: unit1.pas unit1.obj
        tpc /m unit1.pas

unit1.obj: unit1.asm
        tasm unit1.asm

However, if you have Pascal source only, you generally can
just use the Compile to: DISK option in the Compile menu
of the TURBO IDE. If the compiler runs out of memory, often
putting the link buffer to disk helps (Options|Link options;
field Link Buffer, option Disk). If this doesn't help
(and all DOS memory freeing - like DOS=HIGH,UMB and DEVICEHIGH/
LOADHIGH in the CONFIG.SYS - does not help either), you can use
the command line compiler TPC (or, for really large projects,
TPCX) directly. Makefiles are not needed in this case.

Re:Making .exe files


Howdy.

Long time reader, first time poster.

Another cause of the problem might be that he/she has the educational
version(s) that Borland released a number of years ago.

A friend of mine purchased a copy of Turbo Pascal 6.0 and Turbo C 2.0 at her
local college pretty cheap.  She found out, later, that the Compile To Disk
flag was removed from the Compile menu in both versions, thus only making it
suitable for classroom assignments.

Borland used to offer an upgrade from the educational versions to the full
versions.  I'm not sure if they(Inprise) still have that offer or not.

Good luck friends!

-Adam

Quote
On Sun, 14 Feb 1999 17:11:16 -0500, Jeff Freeman <cakew...@voicenet.com> wrote:
>Wolfgang Zi?ler wrote in message <36C729AE.8CCC3...@kmm.de>...
>>Hi outta there,
>>Im using Turbo Pascal 6.0 for DOS and I want to build a .exe-File of my
>>Pascal-Program,
>>so I can run it without Turbo Pascal 6.0.

>>I dont know what has to be in the makefile.

>>Please tell me, how I can make a executable File from my Source.

>>Thanx
>>Wolfgang
>>E-Mail: ziss...@kmm.de

>This is from the posted FAQ's that you should read before asking a question.
>Enjoy.

>* How do I make EXE files with Turbo Pascal?

>In Turbo Pascal, in the compile menu, make sure that the COMPILE TO option
>is
>set to COMPILE TO DISK. Whewn you compile, make or build your program then
>you
>will create the file XXX.EXE, where XXX is the name of your .PAS file.

>--

>Jeff Freeman
>cakew...@voicenet.com
>http://www.voicenet.com/~cakewalk/

--
Windows 95 is a 32-bit extension for a 16 bit patch to an 8 bit
operating system originally coded for a 4 bit microprocessor.

+----------------------------------+
| Adam Lussier                     |
| Programmer                       |
| Traditional Software             |
| aluss...@pacbell.net             |
| tradw...@pacbell.net             |
+----------------------------------+

Re:Making .exe files


Quote
Art Alexakis wrote:
> I tried this but it gave the following error while compiling:

> Error 15: File not found: (tpc.tpu)

> What is the deal with this?  If I'm simply missing a file could
> someone post it?

TPC is the Turbo Pascal command line compiler. The filename is TPC.EXE.

Re:Making .exe files


Quote
"Frdric" wrote:
> Art Alexakis wrote:

> > I tried this but it gave the following error while compiling:

> > Error 15: File not found: (tpc.tpu)

> > What is the deal with this?  If I'm simply missing a file could
> > someone post it?

> TPC is the Turbo Pascal command line compiler. The filename is TPC.EXE.

But in the *context* of the question, it would appear that one unit makes a
reference to "uses tpc", where no such unit exists.  This could be just about
anything, and isn't the name of any standard TP unit.

--
Scott Earnest            | SPAM protection in effect. Remove  |
setech@_ix.netcom.com    | "_" as needed for true addresses.  |
earnests@_homenet.lm.com |    UIN:1136443  EFnet:pale_blue    |
sinykal@_{*word*104}space.org  | URL: http://www.netcom.com/~setech |

Re:Making .exe files


Quote
Art Alexakis wrote:

> On Mon, 15 Feb 1999 13:50:12 +0100, Christopher Eltschka
> <celts...@physik.tu-muenchen.de> wrote:

> [snip]

> >If you want to use makefiles, you have to call tpc or tpcx
> >(the latter uses extended memory during compiling, therefore
> >it can handle larger programs). I

> I tried this but it gave the following error while compiling:

> Error 15: File not found: (tpc.tpu)

> What is the deal with this?  If I'm simply missing a file could
> someone post it?

Seems like a misunderstanding. From the error message, I guess you
added "uses tpc" to your program. This is not what I meant
(indeed, I don't know an unit named TPC; there's definitively
no standard unit of that name).

What I meant is that if you use makefiles, you don't call
turbo.exe from the makefile, but you call the command line
compiler tpc.exe or tpcx.exe. Your source code need not
(and should not) be modified for these.
Calling tpc (or tpcx) can also be useful without makefile,
if the program is too large for turbo.exe (i.e. if you run
out of memory).

One possible error could also be that you got your makefile
format wrong. To invoke tpc for producing XY.EXE from XY.PAS,
your makefile should look like this:

XY.EXE: XY.PAS{--return--}
        {<-this is a tab}TPC /m XY.PAS

The part between { and } are my comments; you should *not*
type them into your makefile. Just leave them out (including
{ and }, of course).

See the manual for more info on make.

Re:Making .exe files


Go to the compile menu at the top, go to destination and click (it
should change to disk, if not make it disk), then compile the program
and it makes the exe file in the same directory the pascal file was in

On Tue, 23 Feb 1999 14:56:38 +0100, Christopher Eltschka

Quote
<celts...@physik.tu-muenchen.de> wrote:
>Art Alexakis wrote:

>> On Mon, 15 Feb 1999 13:50:12 +0100, Christopher Eltschka
>> <celts...@physik.tu-muenchen.de> wrote:

>> [snip]

>> >If you want to use makefiles, you have to call tpc or tpcx
>> >(the latter uses extended memory during compiling, therefore
>> >it can handle larger programs). I

>> I tried this but it gave the following error while compiling:

>> Error 15: File not found: (tpc.tpu)

>> What is the deal with this?  If I'm simply missing a file could
>> someone post it?

>Seems like a misunderstanding. From the error message, I guess you
>added "uses tpc" to your program. This is not what I meant
>(indeed, I don't know an unit named TPC; there's definitively
>no standard unit of that name).

>What I meant is that if you use makefiles, you don't call
>turbo.exe from the makefile, but you call the command line
>compiler tpc.exe or tpcx.exe. Your source code need not
>(and should not) be modified for these.
>Calling tpc (or tpcx) can also be useful without makefile,
>if the program is too large for turbo.exe (i.e. if you run
>out of memory).

>One possible error could also be that you got your makefile
>format wrong. To invoke tpc for producing XY.EXE from XY.PAS,
>your makefile should look like this:

>XY.EXE: XY.PAS{--return--}
>    {<-this is a tab}TPC /m XY.PAS

>The part between { and } are my comments; you should *not*
>type them into your makefile. Just leave them out (including
>{ and }, of course).

>See the manual for more info on make.

Other Threads