Re: [fpc-pascal] Calling function pointer to main program

2020-01-03 Thread Ryan Joseph via fpc-pascal
> On Jan 3, 2020, at 12:29 PM, Jonas Maebe wrote: > > So add 'cdecl; public;" to its declaration and definition. Nice the demo program compiles now. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://li

Re: [fpc-pascal] Calling function pointer to main program

2020-01-03 Thread Jonas Maebe
On 03/01/2020 20:19, Ryan Joseph via fpc-pascal wrote: >> On Jan 3, 2020, at 11:35 AM, Jonas Maebe wrote: >> >> Additionally, you will also have to link in an object/library that does >> define a regular "main" function. And note that this will only work on >> libc-based targets (afaik only Darwin

Re: [fpc-pascal] Calling function pointer to main program

2020-01-03 Thread Ryan Joseph via fpc-pascal
> On Jan 3, 2020, at 11:35 AM, Jonas Maebe wrote: > > Additionally, you will also have to link in an object/library that does > define a regular "main" function. And note that this will only work on > libc-based targets (afaik only Darwin, Solaris, and AIX at this point). So there needs to be

Re: [fpc-pascal] Calling function pointer to main program

2020-01-03 Thread Jonas Maebe
On 03/01/2020 18:33, Ryan Joseph via fpc-pascal wrote: >> On Jan 2, 2020, at 2:57 PM, Ryan Joseph wrote: >> >> extern C_LINKAGE int SDL_main(int argc, char *argv[]); >> >> which they call from within the iOS event loop and that calls the programs >> main functions which was defined using -XMSDL_m

Re: [fpc-pascal] Calling function pointer to main program

2020-01-03 Thread Ryan Joseph via fpc-pascal
> On Jan 2, 2020, at 2:57 PM, Ryan Joseph wrote: > > extern C_LINKAGE int SDL_main(int argc, char *argv[]); > > which they call from within the iOS event loop and that calls the programs > main functions which was defined using -XMSDL_main I still can't figure out how -XM works. Can anyone p