In fact I filed a bug today which was related. Notice how I didn't use cdecl in the program but another user tried to compile and had problems with cdecl also.
https://gitlab.com/freepascal.org/fpc/source/-/issues/40342 <https://gitlab.com/freepascal.org/fpc/source/-/issues/40342#note_1462402401> Basically this program: {$mode objfpc} program test; function printf(format: PChar): Integer; external; cdecl; varargs; begin end. > On Jul 8, 2023, at 2:12 PM, Michael Van Canneyt via fpc-pascal > <fpc-pascal@lists.freepascal.org> wrote: > > They are used together. The FPC sources are full of them, most import > libraries work like that: > > function PQconnectStart(conninfo:Pchar):PPGconn;cdecl;external > External_library name 'PQconnectStart'; > > It would be helpful if you would give the exact statement you are writing. Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal