That would mean your lazbuild project is still i386, doesn't it? If ppcx64 is capable of producing code for loadlibrary which can load x64 libraries, lazbuild should be too. So my guess is that you lazbuild is somehow still stuck on i386.
Can you check the architecture of your lazbuild project using the file command?
You are absolutely correct:
file Project1 gave:
Project1: Mach-O executable i386After adding the correct options to lazbuilt:
lazbuild -B Project.lpi --ws=cocoa --cpu=x86_64 --os=darwin --compiler=/usr/local/lib/fpc/3.0.4/ppcx64and now
file Project1 gives:
Project1: Mach-O 64-bit executable x86_64and 64bit 1-architecture libvol.dylib is found!
Conclusion: although project options have
<TargetCPU Value="x86_64"/> I must specify target architecture as lazbuild's command line option
Thanks for help!! This case is so far solved. My next step is get what I've learned and go back to the original (large) project. If I can get dylibs correctly loaded there, this case is finally solved.