[SOLVED] dirutils error lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- spassigl · 2025-03-28 10:05 I've picked up again a project I was developing on a Linux machine, that compiled without errors, and now moved it to an OSX machine, MacBook Pro with Sequoia 15.3 OS. When building the project I get the following error dirutils.pas(77,85) Error: Call by var for arg no. 4 has to match exactly: Got "FILES.FSRef" expected "MACOSALL.FSRef" dirutils.pas(79,85) Error: Call by var for arg no. 4 has to match exactly: Got "FILES.FSRef" expected "MACOSALL.FSRef" This is the code in dirutils 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       if Global then   // kLocalDomain        theError := FSFindFolder(kLocalDomain, FolderType, kDontCreateFolder, theRef)    else             // kUserDomain        theError := FSFindFolder(kUserDomain , FolderType, kDontCreateFolder, theRef);  Any idea on how to get past this? ---------------------------------------------------------------------- marcov · 2025-03-28 10:35 Afaik the idea is to either use macosall, or the separate units, never both. Adjust your uses clauses accordingly. ---------------------------------------------------------------------- spassigl · 2025-03-28 10:40 Quote from: marcov on March 28, 2025, 11:35:16 amAfaik the idea is to either use macosall, or the separate units, never both. Adjust your uses clauses accordingly. My code only uses dirutils. The error happens when I build the project and dirutils is compiled. ---------------------------------------------------------------------- cdbc · 2025-03-28 11:08 Hi Hmmm... You could try to: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 uses classes, sysutils,{$ifdef MACOS}macosall,{$else}dirutils{$endif};...and see if that would help?!? Just an idea. Regards Benny ---------------------------------------------------------------------- spassigl · 2025-03-28 11:53 Quote from: cdbc on March 28, 2025, 12:08:42 pmHi Hmmm... You could try to: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 uses classes, sysutils,{$ifdef MACOS}macosall,{$else}dirutils{$endif};...and see if that would help?!? Just an idea. Regards Benny So I managed to get past the error with this 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 {$ifdef DARWIN}macosall,{$else}dirutils{$endif}; But now the compiler complains about GetConfigurationDir mainform.pas(287,18) Error: Identifier not found "GetConfigurationDir" as dirutils is not included. ---------------------------------------------------------------------- cdbc · 2025-03-28 12:09 Hi Is that the only complaint, then just copy that function into your own code and 'ifdef' that too... ...or, replace that call with 'GetAppConfigDir();' from sysutils... Regards Benny ---------------------------------------------------------------------- spassigl · 2025-03-28 12:52 Quote from: cdbc on March 28, 2025, 01:09:26 pmHi Is that the only complaint, then just copy that function into your own code and 'ifdef' that too... ...or, replace that call with 'GetAppConfigDir();' from sysutils... Regards Benny Thanks I'll do that.