Thank you
It is actually very close I have gotten it working calling FPC directly...
If all .lib files already has been generated by Lazarus earlier (in my command line script I am actually removing these before building to ensure 100% all of my code gets recompiled with updated defines found in include files.)
Then... it actually compiles the executable on MacOS (one has to change directory to the project directory first if using the command line grabbed from the "Messages > About compile project") and... it appears to run without errors
...
However if I remove .lib files from a shared source directory (not placed in project directory) it stumbles:
Hint: (11030) Start of reading config file /Users/myname/TS/LazarusCocoa64/fpc/bin/x86_64-darwin/fpc.cfg
Hint: (11031) End of reading config file /Users/myname/TS/LazarusCocoa64/fpc/bin/x86_64-darwin/fpc.cfg
Free Pascal Compiler version 3.2.2-r0d122c49 [2024/05/11] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
(1002) Target OS: Darwin for x86_64
(3104) Compiling MyProjectOSX.dpr
(3104) Compiling /Volumes/DiskW/shared-code/MySharedSource Suite/C_SHAREDmsGenericStruct.pas
(3104) Compiling /Volumes/DiskW/shared-code/MySharedSource Suite/UmsSysDeclars.pas
(3104) Compiling /Volumes/DiskW/shared-code/MySharedSource Suite/UmsSysExceptions.pas
UmsSysExceptions.pas(45) Error: (9002) Can't create assembler file: /Volumes/DiskW/projects/MyProject/lib/x86_64-darwin/UmsSysExceptions.s
UmsSysExceptions.pas(45) Error: (1026) Compilation raised exception internally
Fatal: (1024) I/O error: File not open
Error: /Users/myname/TS/LazarusCocoa64/fpc/bin/x86_64-darwin/ppcx64 returned an error exitcode
MyName@MyComp MyProject %
Any ideas what to try? Kinda peculiar problem occurs when running commandline and not when Lazarus runs command line. Maybe Lazarus does some preparation I am not yet duplicating fully.
This is the entire unit by the way:
unit UmsSysExceptions;
{$I AImsCoreDefines.inc}
interface
uses
SysUtils
;
type
EmsException = class(Exception);
EmsNotSupportedInOS = class(EmsException);
EmsNotSupportedInDevToolVersionOS = class(EmsException);
EmsParamWrong = class(EmsException);
EmsParamTypeWrong = class(EmsParamWrong);
EmsParamOutOfValidRangeError = class(EmsParamWrong);
EmsParamsOutOfValidRangeError = class(EmsParamWrong);
EmsParamsMisMatchError = class(EmsException);
EmsMissingRequiredHandler = class(EmsException);
EmsPointerRefNotAssigned = class(EmsException);
EmsValueOutOfValidRangeError = class(EmsException);
EmsValueOutOfUsualRangeError = class(EmsException);
EmsValuesMisMatchError = class(EmsException);
EmsOperationNotPossible = class(EmsException);
EmsOperationNotPossibleUnknownReason = class(EmsOperationNotPossible);
EmsNonExpectedError = class(EmsException);
EmsReturnValueOutOfValidRangeError = class(EmsException);
EmsReturnValueNotAssignedError = class(EmsException);
EmsNotTested = class(EmsException);
EmsNotErrorJustTempTestSeeIfHappensAsItShouldHere = class(EmsException);
EmsNotErrorJustTempTestSeeIfHappensAsItShouldNotHere = class(EmsException);
EmsFileExistsNo = class(EmsException);
EmsFileExistsYes = class(EmsException);
//--
EmsProgramStateWrongCKD = class(EmsException); // see unit *CKmsKVT*
EmsProgramStateWrongMOD = class(EmsException); // see unit *CKmsKVT*
EmsAppFileHealthIssueKEF = class(EmsException); // see unit *UKmsKE*
//------------------------------------------------------------------------------
implementation
end.
As can be seen the declarations are some general ones I use for own purposes.