FPC Compiler lazarus / 65-FV-Textmode IDE ---------------------------------------------------------------------- peter-1 · 2022-01-30 14:55 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 · 2022-01-30 14:58 Free Pascal has no compiled to memory option. You must be confused about some other product. ---------------------------------------------------------------------- Martin_fr · 2022-01-30 15:41 Quote from: peter-1 on January 30, 2022, 03:55:33 pmi 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. ---------------------------------------------------------------------- peter-1 · 2022-01-30 15:44 thanks, but where do I have to enter the target folder? ---------------------------------------------------------------------- Martin_fr · 2022-01-30 15:46 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 · 2022-01-30 16:29 martin, yes, saving via "save as" works fine for the source code but where is the compiled file saved? Peter ---------------------------------------------------------------------- jwdietrich · 2022-01-30 16:31 Quote from: peter-1 on January 30, 2022, 05:29:12 pmmartin, 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. ---------------------------------------------------------------------- peter-1 · 2022-01-30 17:16 I'm going crazy. the compiled file is not saved. ---------------------------------------------------------------------- MarkMLl · 2022-01-30 17:18 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 ---------------------------------------------------------------------- rvk · 2022-01-30 17:19 Please do a Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Showmessage(paramstr(0));somewhere in your program. It will show you exactly where your executable is. ---------------------------------------------------------------------- peter-1 · 2022-01-30 17:29 this is my version ---------------------------------------------------------------------- MarkMLl · 2022-01-30 17:43 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 ---------------------------------------------------------------------- Martin_fr · 2022-01-30 18:00 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 · 2022-01-30 18:04 So do a Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Writeln(paramstr(0));and you know where it is. ---------------------------------------------------------------------- MarkMLl · 2022-01-30 18:09 Quote from: rvk on January 30, 2022, 07:04:57 pmSo do a Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Writeln(paramstr(0));and you know where it is. Oh, and don't forget to compile and run that. MarkMLl ---------------------------------------------------------------------- peter-1 · 2022-01-30 18:50 the directory is correct and I see it in the string, but it still isn't written to the directory. ---------------------------------------------------------------------- MarkMLl · 2022-01-30 18:57 Look, you are /still/ not asking in the right place and I'm not happy being involved since I've not used Windows for years. Stop the IDE. Start it again and tell us STEP BY STEP EXACTLY what you are doing. Make no assumptions and miss nothing out. MarkMLl ---------------------------------------------------------------------- peter-1 · 2022-01-31 13:57 Thanks for your help. My only problem is that i can't save the .exe or .tpu. everything works without an error message. Saving .pas also works. ---------------------------------------------------------------------- MarkMLl · 2022-01-31 14:03 We know what your problems are better than you do and if you don't answer the questions then you don't get any help. I checked yesterday evening and the fp IDE /does/ save executables. But I'm not taking the time to do a full-blown tech-writing explanation of how to do it: say what you're doing and (subject to OS differences) I and no doubt others will try to duplicate it and find what's happening. MarkMLl ---------------------------------------------------------------------- peter-1 · 2022-01-31 14:36 Excuse me. I have the PC WIN7 prof. 64bit. freepascal IDE has been reloaded. there are no error messages. unfortunately the compiled file DIA_TPU.TPU cannot be found. that's the only mistake. probably a switch is not set correctly. ---------------------------------------------------------------------- rvk · 2022-01-31 14:40 Did you put Writeln(paramstr(0)); in your program? What did it say after you ran it? You can set the output directory of the executable in the options so there is no telling for us to where it is. Only you can give that answer with the value of paramstr(0). ---------------------------------------------------------------------- MarkMLl · 2022-01-31 14:40 > DIA_TPU.TPU Hardly surprising. What makes you think it's generating a file with that name? MarkMLl ---------------------------------------------------------------------- peter-1 · 2022-01-31 14:47 it all worked fine in TurboPascal under WIN98, WINXP or old DOS. I only have to create a UNIT and cannot run the program like this. ---------------------------------------------------------------------- peter-1 · 2022-01-31 14:50 the header of the program. ---------------------------------------------------------------------- rvk · 2022-01-31 14:52 You will get a .ppu somewhere. A .tpu is for Turbo Pascal. FPC generates .ppu files. What do you want to do with such a .ppu file? (It doesn't execute by itself) ---------------------------------------------------------------------- PascalDragon · 2022-01-31 14:54 Quote from: peter-1 on January 31, 2022, 03:47:39 pmit all worked fine in TurboPascal under WIN98, WINXP or old DOS. I only have to create a UNIT and cannot run the program like this. Free Pascal does not generate TPUs. Instead the compiled variants of units consist each of a .ppu and a .o, so in your case look for a DIA_TPU.ppu and DIA_TPU.o (both are important if you want to store them somewhere). ---------------------------------------------------------------------- peter-1 · 2022-01-31 16:26 OK ! Thank you, thank you, thank you ! That was my stupid mistake. Now it works ! Peter ---------------------------------------------------------------------- MarkMLl · 2022-01-31 17:20 [Chuckle] The problem is that we all interpreted what you were saying as that it didn't save a .exe anywhere... which is why I started off from the position of not even assuming that you were running FPC. MarkMLl