• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1192
  • Last Modified:

Compile a *.pas

Hi. I've got several problems made in Turbo Pascal. I need to compile them from *.pas to *.exe
My project it's like this:
got the source in a memo  -> export the source in to a .pas file where ever i want and after then compile it to make an exe.
I tryed using dcc32 from \..\delphi\bin, but it exports me an 2 kb exe wich handle's a runtime error 2. and it closes.

Thanks for help ;)
0
A. Cristian Csiki
Asked:
A. Cristian Csiki
  • 2
  • 2
1 Solution
 
HillGrooverCommented:
Hi nodramas,

Are you using TurboPascal or are you coding in Delphi?
0
 
A. Cristian CsikiSenior System AdministratorAuthor Commented:
i'm using delphi 7. And i need to compile a .pas file exported from a memo from a delphi application.
0
 
2266180Commented:
so the pas files are fomr turbo pascal and your application is written in delphi 7. si that so?
if yes, then you will need the turbo pascal compiler available: tpc.exe for turbo pascal or bpc.exe for borland pascal
depending on your needs, you might want to check out the command line compiler options (just run tpc or bpc withoiut any parameters and they will output the command switches)
you could also compile using dcc32. but you will have to specify to the compiler to compile in console mode: the -CC command line switch
0
 
A. Cristian CsikiSenior System AdministratorAuthor Commented:
yes ciuly..both mothods works grate, but compiling using dcc32 it's better...because i use only dcc32.exe , SysInit.pas(and dcu one) and System.pas(and dcu one) and compiles very good.
But why it didn't worked with this:  dcc32 test -txexe   from delphi's help???

Thanks very much. I appreciate. ;)
0
 
2266180Commented:
because by default it tries to compile a win application, but the pascal sources are for console applications and have no dupport for win application (you must inlude forms.pas so that the application can receive windows messages ;) )
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now