Uffe Kousgaard 0 Posted February 21, 2022 (edited) Is it possible to have the compiler output the source code as it looks after ifdef's etc. have been applied? Our problem is our source code is also sent to the Oxygene compiler and after a change, it no longer handles Delphi compatible ifdef's. If we can send it preprocessed code, the problem would be solved. If anyone happens to know if it is possible with freepascal compiler, it would also be great. Edited February 21, 2022 by Uffe Kousgaard Share this post Link to post
Guest Posted February 21, 2022 Isn't "Oxygene" only sold with support? I thought so. If there is a "free" alternative, i am interested in knowing about it. If i am correct, RemObjects should help with this IMHO. Share this post Link to post
David Heffernan 2345 Posted February 21, 2022 1 hour ago, Uffe Kousgaard said: Is it possible to have the compiler output the source code as it looks after ifdef's etc. have been applied? Our problem is our source code is also sent to the Oxygene compiler and after a change, it no longer handles Delphi compatible ifdef's. If we can send it preprocessed code, the problem would be solved. If anyone happens to know if it is possible with freepascal compiler, it would also be great. Writing a pre-processor to handle conditionals should be quite straightforward. I doubt that there exists the pre-processor that you describe. Share this post Link to post
Uffe Kousgaard 0 Posted February 21, 2022 1 hour ago, Dany Marmur said: Isn't "Oxygene" only sold with support? I thought so. If there is a "free" alternative, i am interested in knowing about it. If i am correct, RemObjects should help with this IMHO. Remobjects has deliberately changed the product, so it is less compatible with Delphi in this area. It is not something they are going to undo. Share this post Link to post
Uffe Kousgaard 0 Posted February 21, 2022 34 minutes ago, David Heffernan said: Writing a pre-processor to handle conditionals should be quite straightforward. I doubt that there exists the pre-processor that you describe. So did my colleague think, before he started working on it. Nested ifdef's makes it complex, when also dealing with comments, strings etc. Share this post Link to post
Bill Meyer 337 Posted February 21, 2022 You may wish to look at DelphiAST and at Uwe Raabe's UsesCleaner. Share this post Link to post
Fr0sT.Brutal 900 Posted February 28, 2022 On 2/21/2022 at 6:34 PM, David Heffernan said: Writing a pre-processor to handle conditionals should be quite straightforward But getting actual values is much more tricky and messy Share this post Link to post