Jump to content

Recommended Posts

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 by Uffe Kousgaard

Share this post


Link to post
Guest

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
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
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
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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×