SysErrorMessage(GetLastOSError) returns Success
Yes, the dynlib is within the bundle, I use
ExtractFilePath(Application.ExeName) + 'libmyapp.dylib' to access it, my exceptions show that this is the path used, the name is (different from libmyapp.dylib) quite unique, and if the library would not be found,
LoadLibrary probably wouldn't return a handle.
Creating a miniature demo, I receive this error message:
This binary has no dynamic library support compiled in.
Recompile the application with a dynamic-library-driver in the program uses clause before other units using dynamic libraries.
Which unit do I need to include to be able to use dylibs on console on MacOS?
(edit: I added the Cocoa widgetset and LCL and LCLBase as requirements, and Interfaces and LCLIntf to the uses part, now the test program works, but still returns the same error. Will create an example dylib as well now)
@Thaddy: What I meant is this:
{$MACRO ON}
{$IF DEFINED(MSWindows)}
{$DEFINE AppNameConvention := stdcall}
{$ELSEIF DEFINED(Darwin)}
{$DEFINE AppNameConvention := cdecl}
{$IFEND}
...
type
TFunc = procedure(); AppNameConvention;
I didn't even get the idea to "overwrite" the name of a calling convention due to the possible irritation you refer to.