PDA

View Full Version : Argument Passing Convention Compile Option


garyscott
02-26-2004, 03:37 PM
I would like to formally recommend compiler options to have the compiler produce libraries and DLLs with a specific "foreign" argument passing convention. It should be generic and allow specification of things like STDCALL/CDECL, character string argument after associated string or at EOL or not at all (I guess that would assume null termination), name mangling prefix and suffix convention (including "@<arglenthinbytes>"), etc. (you would know better than I the details of course). I think that this would be a tremendous marketing advantage. You could use LF95 to produce libraries (e.g. API wrappers) for use with other compilers without requiring the compiler vendor to create separate sources modified for each vendor's peculiar C-interfacing methodology and to own each and every other compiler (although probably would anyway in order to test).

It is fully acceptable that the "foreign" library produced is not directly usable with LF95 by default without similar effort to what would be required to interface with C (i.e.explicit specification of how each foreign API should be called). The library vendor would simply produce one version capatible with LF95 defaults, another (simple recompile with different options) for CVF, another for FTN95, etc. (if the convention differs of course). It might be that only a small number (two or three) foreign conventions are required.

Maybe you presently only support this detailed specification and control of argument passing convention on input and not output so perhaps it is a bigger task that I think.

Thanks

garyscott
02-26-2004, 07:41 PM
I guess you do support this since you have options similar to my request for VB and Delphi.