> On Feb 1, 2022, at 3:15 AM, Jonas Maebe via fpc-pascal 
> <fpc-pascal@lists.freepascal.org> wrote:
> 
> It only works in your main program, not in a unit or so. Maybe that's the 
> reason?

The linker wants me to redefine "main" to clear the error but this doesn't make 
sense and the app crashes when launched.  I.e.:

function main(argc: integer; argv: pchar): integer; cdecl; public;

https://stackoverflow.com/questions/11976084/why-sdl-defines-main-macro

states that SDL wants to rename your main function to SDL_main so that it can 
use its own main function (main I assume) which then calls out to your main 
function. I had old code from 2016 which appears to do this but for some reason 
now I'm getting this linker error.

My only guess is that the linker can't find the SDL main function in the 
framework, even though everything else links properly.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to