The code is as above, BUT BUT BUT I think the issue to some extent was that there was a miss mash of 32bit/64bit compile options. It is (to a newbie at least) very confusing since, as near as I can figure out there are two places where you need to tell the system your are 64 bitting (sp).
- Tools>Options>Files you need the compiler to be ppcX64
- That option wasn't available in my install so I was using ppc386
- I 'Think' that was the cause of my issues in the original question
- You also need to (in Project>Options>Config and Target> set it to x86-x64
- None of the other options in that group work
OK did that and finally the errors Stopped:
ld: symbol(s) not found for architecture i386
An error occurred while linking
Big clue with the i386, but that part of the message wasn't visible unless you copied ALL message data (another trap for young players)
NOW however I am getting an error cannot find fpcres. I can confirm that fpcres is where it should be in /usr/local/bin. So again, how to I set the path so that fpcres can be found and my simple little application build?
here is the complete message details:
Hint: (11030) Start of reading config file /etc/fpc.cfg
Hint: (11031) End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 3.0.4 [2017/11/26] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Darwin for x86_64
(3104) Compiling pDYLIBTestAPP.lpr
(3104) Compiling udylibtestapp.pas
/Users/kevin/Dropbox/Lazarus/DYLIB Test/udylibtestapp.pas(28,28) Hint: (5024) Parameter "Sender" not used
/Users/kevin/Dropbox/Lazarus/DYLIB Test/udylibtestapp.pas(27,28) Hint: (5024) Parameter "Sender" not used
/Users/kevin/Dropbox/Lazarus/DYLIB Test/udylibtestapp.pas(26,28) Hint: (5024) Parameter "Sender" not used
(9001) Assembling (pipe) /Users/kevin/Dropbox/Lazarus/DYLIB Test/lib/x86_64-darwin/udylibtestapp.s
(9001) Assembling (pipe) /Users/kevin/Dropbox/Lazarus/DYLIB Test/lib/x86_64-darwin/pDYLIBTestAPP.s
pDYLIBTestAPP.lpr(25) Error: (9021) resource compiler "fpcres" not found, switching to external mode
pDYLIBTestAPP.lpr(25) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
So the real issue here MUST be that, since I can just type in "fpcres" at any terminal window and it is found and executed, there MUST be some sort of Link/hard coded path to fpcres that is incorrect. This is driving me bonkers, and I cannot proceed pas this point since I cannot compile / build anything.
UPDATE: I reinstalled everything and same error, ie. cannot find fpcres. Now I tried to install a package and of course that blew up with the same error. Essentially the WHOLE Lazarus thing is now broke and I can go no further.
Again, thanks in advanx......