PLEASE DON'T POST JUST TYPED TEXT.
Use real code you have in your project !!
(and use the #-code button to mark code)
Sorry about my newbie mistakes, and yes, your version of code looks better (lesson learned
).
As you already concluded, I didn't copy-paste the actual code, hence the typos. The original code in my Lazarus-project is a bit longish.
The dylib my app loads is written in Fortran and compiled for 64-bit OSX. I can use the function successfully when compiling a simple test program with ppcx64 or when using early (static) binding in Lazarus. The problem is GetProcAddress when compiled via Lazarus target OS being "Default" and target CPU being x86_64. In my case, I use lazbuild with , but that shouldn't make any difference or does it?
So far, I've compared a large Lazarus project vs. a simple ppcx64 compiled console application. The former is built with:
lazbuild -B MApp.lpi --ws=cocoa --cpu=x86_64 --os=darwin --compiler=/usr/local/lib/fpc/3.0.4/ppcx64
and latter:
ppcx64 -MDelphi veri2.pas
My next step is testing GeProcAddress with a simple Lazarus-console application.
I suppose that calling convention shouldn't be an issue in 64-bit applications?