Recent

Author Topic: FPC Compiler  (Read 4059 times)

peter-1

  • New Member
  • *
  • Posts: 11
FPC Compiler
« on: January 30, 2022, 03:55:33 pm »
i despair How can I switch from memory to disc when compiling. the compilation works and there is no error message, but i don't get any save to disc.


marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 10283
  • FPC developer.
Re: FPC Compiler
« Reply #1 on: January 30, 2022, 03:58:12 pm »
Free Pascal has no compiled to memory option. You must be confused about some other product.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8260
  • Debugger - SynEdit - and more
    • wiki
Re: FPC Compiler
« Reply #2 on: January 30, 2022, 04:41:55 pm »
i despair How can I switch from memory to disc when compiling. the compilation works and there is no error message, but i don't get any save to disc.

Are you using "Lazarus IDE"?

"Lazarus IDE" will save to a temporary directory, if you compile or run.

Normally, this is  C:\Users\YOUR_USER_NAME\AppData\Local\Temp\
And some files in  C:\Users\YOUR_USER_NAME\AppData\Local\Temp\lib

The executable C:\Users\YOUR_USER_NAME\AppData\Local\Temp\project1.exe


You should save your project first. 
You should save to a new, empty folder.
Use menu "Project" > "Save Project as"

After you have saved the project => The executable (project_name.exe) will be in that folder. The folder in which you saved the project.
« Last Edit: January 30, 2022, 04:44:32 pm by Martin_fr »

peter-1

  • New Member
  • *
  • Posts: 11
Re: FPC Compiler
« Reply #3 on: January 30, 2022, 04:44:33 pm »
thanks, but where do I have to enter the target folder?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8260
  • Debugger - SynEdit - and more
    • wiki
Re: FPC Compiler
« Reply #4 on: January 30, 2022, 04:46:45 pm »
When you do "Save project as" you get a normal "save dialog".  (like when you save a text in normal editor or office)

You can select the folder in that dialog.

peter-1

  • New Member
  • *
  • Posts: 11
Re: FPC Compiler
« Reply #5 on: January 30, 2022, 05:29:12 pm »
martin,
yes,
saving via "save as" works fine for the source code but where is the compiled file saved?
Peter

jwdietrich

  • Hero Member
  • *****
  • Posts: 1197
    • formatio reticularis
Re: FPC Compiler
« Reply #6 on: January 30, 2022, 05:31:38 pm »
martin,
yes,
saving via "save as" works fine for the source code but where is the compiled file saved?
Peter

It is saved in this project folder as well.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.12 | FPC 3.2.0 | PPC, Intel, ARM | macOS, Windows, Linux

peter-1

  • New Member
  • *
  • Posts: 11
Re: FPC Compiler
« Reply #7 on: January 30, 2022, 06:16:14 pm »
I'm going crazy. the compiled file is not saved.

MarkMLl

  • Hero Member
  • *****
  • Posts: 5136
Re: FPC Compiler
« Reply #8 on: January 30, 2022, 06:18:48 pm »
Please report the version etc. of the Lazarus IDE that you're using (Help -> About Lazarus). Also it would be useful if you said what operating system you're using.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

rvk

  • Hero Member
  • *****
  • Posts: 4947
Re: FPC Compiler
« Reply #9 on: January 30, 2022, 06:19:11 pm »
Please do a
Code: Pascal  [Select][+][-]
  1. Showmessage(paramstr(0));
somewhere in your program. It will show you exactly where your executable is.

peter-1

  • New Member
  • *
  • Posts: 11
Re: FPC Compiler
« Reply #10 on: January 30, 2022, 06:29:42 pm »
this is my version

MarkMLl

  • Hero Member
  • *****
  • Posts: 5136
Re: FPC Compiler
« Reply #11 on: January 30, 2022, 06:43:02 pm »
That's not Lazarus, so you should be asking in the general forum area not here.

In any event, it /will/ be creating an executable file, and since it appears that you're running some version of Windows it sill have the extension .exe

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8260
  • Debugger - SynEdit - and more
    • wiki
Re: FPC Compiler
« Reply #12 on: January 30, 2022, 07:00:02 pm »
Ok, that is the "Free Pascal IDE" => "FP-IDE"

I do not know the answer "where is the exe".

But I guess: in some folder inside the "project folder". Maybe there is a "lib" or "lib/i368-win" or "lib/x86-64368-win", .... folder?



Or maybe .... Do you have Anti Virus software?

I had problems in the past. AV software would delete my self build exe. And, no it was NOT a virus. 100% sure.

rvk

  • Hero Member
  • *****
  • Posts: 4947
Re: FPC Compiler
« Reply #13 on: January 30, 2022, 07:04:57 pm »
So do a
Code: Pascal  [Select][+][-]
  1. Writeln(paramstr(0));
and you know where it is.


MarkMLl

  • Hero Member
  • *****
  • Posts: 5136
Re: FPC Compiler
« Reply #14 on: January 30, 2022, 07:09:06 pm »
So do a
Code: Pascal  [Select][+][-]
  1. Writeln(paramstr(0));
and you know where it is.

Oh, and don't forget to compile and run that.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018