[fpc-pascal] Proper preprocessor?

Schindler Karl-Michael karl-michael.schindler at web.de
Wed Jun 20 12:54:02 CEST 2018



> Am 20.06.2018 um 12:00 schrieb fpc-pascal-request at lists.freepascal.org:
> 
> Date: Wed, 20 Jun 2018 16:25:39 +0700
> From: Ryan Joseph <ryan at thealchemistguild.com>
> To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
> Subject: Re: [fpc-pascal] Proper preprocessor?
> Message-ID: <D900F179-F2AE-49C1-9D1D-EF7AB1296A26 at thealchemistguild.com>
> Content-Type: text/plain;	charset=utf-8
> 
> How does an external preprocessor work if the compiler doesn’t about it? Doesn’t it totally mess up the line numbers for debugging?

If the preprocessor really does such extended work, can't one simply keep the intermediate output of the preprocessor as a source file and then relate to that?

I did quite some work in transposing C header files to Pascal. Most of the defines could simply be converted into const statements by h2pas.

For more elaborate stuff, like versions of installed C libs and such, the usual tools known C programming (m4, configure, …) can be used (Ultrastar Deluxe has quite some use of them), as already mentioned by Michael Van Canneyt. Due to their complexity, I would avoid them as much as possible.

My 2 cents - MiSchi.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180620/921bc444/attachment.sig>


More information about the fpc-pascal mailing list