Will pay for a solution lazarus / 41-Jobs ---------------------------------------------------------------------- user5 · 2025-05-31 23:38 I have a Lazarus 1.0.10 program that I would like to work on in Lazarus 2.2.6 and it loads okay but when I try to compile or build it then I always get the error message shown in the attached picture. If anyone can solve this for me then I would be glad to pay for it though perhaps there is no solution. Thanks. ---------------------------------------------------------------------- user5 · 2025-05-31 23:43 Well, my attached picture didn't appear with the post so I'm trying again with a different format. If this fails then I'll try to send a smaller size picture. ---------------------------------------------------------------------- srvaldez · 2025-06-01 00:46 it seems to me that the compiler is suggesting converting some variables to Int64 to prevent overflow ---------------------------------------------------------------------- paweld · 2025-06-01 04:43 Add LazUtilsStrConsts unit to uses section. ---------------------------------------------------------------------- Martin_fr · 2025-06-01 06:58 The Error is shown in a LazUtils  unit. Which normally compiles. I suspect that the installation is broken. When you upgraded, did you uninstall the old first? That may be needed. 2 Options. 1) Try menu: Tools > Configure build lazarus selecte "clean all" then "build" 2) Uninstall, or delete the directory, the install again ---------------------------------------------------------------------- user5 · 2025-06-01 22:54 I have never installed Lazarus without first removing any existing version.     I don't know what you mean when you say that the installer is broken. I'm using the same new Lazarus version that everyone uses and it works fine with all my other programs so I don't see how the installation could be broken.     I went to the Tools menu and did what was suggested but that didn't work. I've installed and uninstalled many times and I see no point in doing that again.     The program builds fine on a 32-bit computer using the old Lazarus version. The build fails when I try to build it on a 64-bit machine using a new 32/64 Lazarus version.     I added LazUtilsStrConsts to the uses section but no luck.     Does UtF8 have anything to do with LazUTF8, which is in the uses section?     Maybe the person who wrote that winlazfileutils.inc code could help me.     The reason I'm concerned and am willing to gladly pay for a solution is because the computer which runs the early Lazarus version is very old and it won't last forever.     Thanks. ---------------------------------------------------------------------- Martin_fr · 2025-06-01 23:37 Quote from: user5 on June 02, 2025, 12:54:17 amI have never installed Lazarus without first removing any existing version. Ok, good. I didn't know. Quote    I don't know what you mean when you say that the installer is broken. I'm using the same new Lazarus version that everyone uses and it works fine with all my other programs so I don't see how the installation could be broken. If you had just installed without uninstalling, then that could have created a mix of old and new, and that mix would not work. Quote    I added LazUtilsStrConsts to the uses section but no luck. Now there is something unexpected. I just looked at a 2.2.6 install (as well as a 4.0 install). The unit LazFileUtils (which contains GetAppConfigDirUTF8 ) already has LazUtilsStrConsts in its uses clause. So if you added it, then it should be there twice, and that would give an error. So, then did you somehow got a different version of that file? To be sure (just a habit, to check the obvious too): The file that you added it to is "LazFileUtils" ? You did not include   {$I lazfileutils.inc} in some other unit? In some unit of your own? Quote    Does UtF8 have anything to do with LazUTF8, which is in the uses section? LazUtf8 contains some helper function to deal with Utf8 encoded unicode text. The function GetAppConfigDirUTF8 returns the directory in utf8 encoding. (translated from the unicode utf16 wide string that Windows itself provides) Windows can handle filenames either as Unicode (widestring) or Ansi (local encoding, limited to chars in the local encoding). Lazarus provides access to the Widestring name, but re-encoded as utf8. Quote    Maybe the person who wrote that winlazfileutils.inc code could help me.     The reason I'm concerned and am willing to gladly pay for a solution is because the computer which runs the early Lazarus version is very old and it won't last forever. All fine and good. I offer you the bits of knowledge I have for free. And I guess some other will do too. If someone else can do better and wants to charge for it... That is between you and them. I did not write that unit. But I do build the windows installer. So I have some background. On the other hand, based on the info from your description, I have not enough details to - know what it is - know if I can find out So best I can offer right now, is to ask question, hoping some answer will bring forward some detail that gives me a clue. So - other projects work - Configure build Lazarus "did not work"   => it gave you an error?   => it did somethinge, without error / but did not fix the issue? My "unit LazUtilsStrConsts;" c:\lazarus/components\lazutils\lazutilsstrconsts.pas has the declaration:   lrsUnableToCreateConfigDirectoryS = 'Unable to create config directory "%s"'; On line 37. Does yours too? Rather unlikely, but by any chance in your project folder or any subfolder of you project (not c:\lazarus - but where your own code is) is there a file named lazutilsstrconsts.ppu ? It should not be there. Does your project cross compile (target a different OS, or bitness, or CPU )? I just wonder, the package LazUtils is precompiled. Normally if you build your project this package should not need to be compiled. But if you get compilation errors in it, then it did get compiled... ---------------------------------------------------------------------- user5 · 2025-06-02 18:13 Gosh, thank you so much for making the effort to try and help me. I just don't understand why the program compiles on an old Lazarus version but not a new one. Is that some kind of clue?     Someone suggested that I add LazUtilsStrConsts to the uses clause of my main unit (not LazFileUtils) but I took it out.     I do not have {$I lazfileutils.inc} anywhere in my program.     Configure build Lazarus processed fine but it did not fix the problem. I did not get an error message.     Yes, line 37 of lazutilsstrconsts.pas has the same statement you mentioned.     I searched all files for lazutilsstrconsts.ppu but did not find it.     I don't know if the following info is relevant, but I will mention it just in case: I think that somewhere in my code is a dangling procedure that was not correctly removed or made to be inert because I made a mistake. For example, whenever I use the Menu Editor to create a new menu item, the Menu Editor will say something like "New Item100" which is supposed to create a new, unused menu item. However, when I double click on that item the click always leads to an existing menu item that already contains code. Thus, I have to create two menu items, deleting the first item and then using the second one, if that makes any sense. It's hard to explain.     The main form of my program can be built and compiled but it cannot be run from the IDE because some other small program launches it.     The main form is huge and the overall program including sub programs has around a million lines of code, no exaggeration, so there is no way that I can simply transfer the code piece by piece into my other Lazarus compiler.     The main form contains my earliest work and some of it is not very elegant. ---------------------------------------------------------------------- Martin_fr · 2025-06-02 18:51 Quote Someone suggested that I add LazUtilsStrConsts to the uses clause of my main unit (not LazFileUtils) Ah, yes. That someone made it ambiguous.  Probably meant "insert to the uses of the unit that fails to compile". According to your image that is  C:\lazarus\components\lazutils\winlazfileutils.inc (as shown on the status bar of the editor). That inc file is part of the unit C:\lazarus\components\lazutils\lazfileutils.pas And that unit 1) Should already have that statement 2) Should not fail to compile 3) Should not even get compiled, because it is pre-compiled Of course you may have changed settings for the project => old project, over time some settings will be made... Lets gather some more details. A) If you can (if not too big, and not private) attach your projects lpi file (that is an XML file that contains settings you made / it also contain a list of units, so if that is private then don't) You can also  send per PM or mail lazarus () mfriebe _ de where () = @ and _ = . If you can't or wont sent that file make a screenshot of Menu: Project > Project Options => Page: Compiler Options > Paths B) Copy and paste the content of Menu: View > Ide Internals > What needs building C) Compile the project to get the error. Then right click the error message and select Copy > Copy All/Original messages to clipboard zip and attach (or send by pm/mail) If it is to big, then sent paste it in an editor on your computer, and select the last 200 lines and send those. Also try cleaning your project dir and build.... (I don't expect this to be the problem, but better try one thing to much than skipping something that may have had a chance to help) This is assuming your project dir is separate from c:\lazarus To do this - backup your project - using the windows explore find in your project dir (including all subfolders) any file with the extension .ppu => delete those files - any file with the extension.o => delete too - then compile again. ---------------------------------------------------------------------- paweld · 2025-06-03 04:51 Quote from: Martin_frQuote Someone suggested that I add LazUtilsStrConsts to the uses clause of my main unit (not LazFileUtils) Ah, yes. That someone made it ambiguous.  Probably meant "insert to the uses of the unit that fails to compile".That's exactly what I meant. Although I thought the errors were related to one of the project units. I didn't notice: Quote from: Martin_frAccording to your image that is  C:\lazarus\components\lazutils\winlazfileutils.inc (as shown on the status bar of the editor). ---------------------------------------------------------------------- user5 · 2025-06-03 21:36 I am considering everything that you said. Some of it may be over my head.     I am the author of a program called VirtualU, a picture and video editor. I gave the copyright to one of my nephews but I talked to him and he says that it's okay to donate the program to the Lazarus Forum when I can no longer work on it. I don't want it to be open source so that the Forum will have exclusive rights to it if they want it. The owner has rights too.     You don't need to say anything and I would prefer it that way, except for my compiling problem. It's just something that will eventually happen.     I will post a message shortly in the third-party section.     I'm swamped with work right now but I will think about your comments.     Thanks. ---------------------------------------------------------------------- user5 · 2025-06-05 18:56 I deleted all files with the .o and .ppu extensions but the program still gets the same error. All those files were in lib\i386-win32. As a test I also removed all references to Utf8 but that didn't work either.     To try and fix this problem I once installed a number of Lazarus versions that were newer than the problem version but older than the newest version in an attempt to at least get the program to compile is some other version.     I may try that again.     Thanks for your efforts. ---------------------------------------------------------------------- user5 · 2025-06-08 22:34 This is the Lazarus jobs section and I've seen folks seeking work.     Well, here it is: I'm offering real money to hire anyone or a team to solve the problem discussed in this thread for whatever fee you want up to a point.     I'm stuck and there is nothing else I can do. Are you going to tell me that no one at Lazarus can provide hope for a cure?     By the way, this is just a humble idea and you may well not agree for what may be very good reasons, but I think it would be nice if the Forum could be a place where folks who know nothing about coding could download useful programs written by its members.     I don't know if you've noticed lately but recently I have found that there aren't as many free online video services as there used to be.     The whole goal here is to be a player, to be involved and to matter.     However you feel, remember that I'm a long supporter (and recipient) of this forum and now I'm willing to pay for it.     I will have to get a new computer to install the middle version Lazarus program so that I can test it with the problem lpi.     There is no way in heck that I would ever uninstall the new version that I'm using to write sub programs.     Meanwhile I will continue coding. I can't stop.     Anyway, thanks. ---------------------------------------------------------------------- user5 · 2025-06-10 22:02 Say, how about $300? Would that be enough? This is so serious for me.     I would be happy to pay someone personally or donate to the forum.     I would at least like to find out why this problem happens, much less the solution.     For example, a person might like to find out why his program crashes and the first part of solving the problem would be for the person to hear something like "Well, this happened because the boundaries of the array were exceeded."     The person would then be able to fix the problem on his own.     Thank you for your courtesy. I love this forum. ---------------------------------------------------------------------- Martin_fr · 2025-06-10 23:02 Just a note here, there are 2 (likely) scenarios. (and who knows how many that I have not thought of...) 1) The issue is in your project. In that case, you probably sent the project to the other person (agreeing with them on terms of privacy). They will sent it back in a) compilable form    (a) for this an interested party may want to know, if there are 3rd party modules involved?    Any packages you downloaded and use? Any databases that need to be present to compile (or other libraries that get linked)? b) working (as in fix any runtime issues / crashes / incorrect output / ...)     (b) could discourage others as the amount of work can't be easily estimated. 2) The issue is in your overall setup That could be your lazarus install, but also other apps installed on your system, that interfere... If it is your setup, then you will likely have to grant the other party access via teamviewer or some other remote access. ---------------------------------------------------------------------- user5 · 2025-06-13 23:04 I still haven't found out what the Lazarus compiler error message means, the line being: "if Create and not ForceDirectoriesUtf8(Result) then". I have tried to do research to find out more about Utf8 and from what I can see it involves strings and/or text.     I surmise that if Create = true then a build is in progress.     ForceDirectoriesUtf8 maybe refers to whether or not to force the creation of a directory or folder involving Utf8.     I feel that I may be close to an answer but I'm not there yet.     Can anyone at least confirm that Create refers to a build? Please.     By the way, you might check out our new video "VirtualU Tour 4" on YouTube. ---------------------------------------------------------------------- user5 · 2025-06-13 23:13 I just noticed that in the Online Package Manager is a checkbox for UTF8 tools. Should I check that box and install those tools? I may inquire about these things in the Lazarus General section. Thank you so much for your help. ---------------------------------------------------------------------- Martin_fr · 2025-06-13 23:30 Quote from: user5 on June 14, 2025, 01:04:30 am    Can anyone at least confirm that Create refers to a build? Please. 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 function GetAppConfigDirUtf8(Global: Boolean; Create: boolean = false): string;...begin...  if Create and not ForceDirectoriesUtf8(Result) then    raise EInOutError.Create(Format(lrsUnableToCreateConfigDirecto ryS,[Result]));end;  I am not sure what you mean by "a build", so my answer may be far off => the only build you do is your project. But the build itself does not run the code. I.e. the error does not happen when the code is executed, but when compiled. The code is compiled regardless if that function will be used or called. The code is compiled because, - either: something in that packages (LazUtils / the units that are in that folder) is required - or: you managed to include the unit in some other way If the code were successfully compiled, and if it would then be executed, it would try to get a folder inside the systems config area. I.e. possible in %PROFILESPATH%\All Users\Application Data or  %USERPROFILE%\Local Settings\Application Data It would try to get a folder with the app-name (and maybe vendor). "CREATE" would mean if that folder does not exist, then that folder would be created. But, it does not compile, it does not try to get the config folder, it does not try to create that folder.... "lrsUnableToCreateConfigDirectoryS" is a contstant. Normally that code is compiled as part of the unit LazFileUtils, which contains "{$I winlazfileutils.inc}". But... - if it was compiled through this, it should not give that error. (and it did indeed not give that error when you rebuild the IDE) - normally LazUtils should not need to be compiled. There can be reasons, but its suspicious. So my suspicion is, that this file is referred to in some other way, and the compiler tries to compile it in a way it was not meant to. But from the tiny snippet of errors shown on the screenshot, I can not tell what it is... Try at least (context menu): Copy > Copy all/original messages And the post the entire text of all those messages (or at least the last 300). ---------------------------------------------------------------------- Martin_fr · 2025-06-13 23:32 Quote from: user5 on June 14, 2025, 01:13:16 am    I just noticed that in the Online Package Manager is a checkbox for UTF8 tools. Should I check that box and install those tools? I may inquire about these things in the Lazarus General section. Thank you so much for your help. I wouldn't think you need them / I wouldn't think it makes a difference. At least if your error still is what is on the image in your first post? That error is not about missing any utf8 related stuff. ---------------------------------------------------------------------- user5 · 2025-06-14 00:51 Yes, VirtualU makes use of components like EpikTimer, BGRABitmap and other packages and it also uses third party open source programs. VirtualU complies with all of their requirements or we have their permission.     They're all listed in VirtualU's About tab. ---------------------------------------------------------------------- n7800 · 2025-06-15 02:51 To reliably clean the project from old files (as Martin advised), it is better to use "Main Menu > Run > Clean up and Build". Check all 4 boxes and click "Clean up and build". When finished, try to run your project. Be sure to try this, as it should clean not only the project, but also the LazUtils package that you are having a build problem with. ---------------------------------------------------------------------- Juerg · 2025-06-24 15:54 Use https://wiki.freepascal.org/fpcupdeluxe it is great!