Project compiler directives not working

Compiler directives that are set at the project level in the project compile options under "Directives" appear to not be accessible. Also the expected "WEBLIB" directive appears to not be preset.

  1. "WEBLIB" as a project compiler directive does not seem to be set, whereas it is preset in other environments (Delphi & Lazarus).
  2. Setting it in the project compile options does not seem to work either.
  3. The preset directives of "DEBUG" and "RELEASE" also appear to be not available when compiling.

I cannot reproduce this.
Simple test for new app with button on form:

procedure TForm1.WebButton2Click(Sender: TObject);
begin
  {$IFDEF WEBLIB}
  ShowMessage('Hello world')
  {$ENDIF}  
end;

This shows the message, so WEBLIB define exists.

I just created a new project and it works. But as soon as I add an existing file to the project it loses the directives. That file does introduce a lot of other existing files through its uses clauses, but I can't see why they would undefine anything. Those same files all together compile without error with WebCore under Lazarus. Under Delphi they compile but finish with a "List index out of bounds (-1)" error which is one reason I'm trying the other options for WebCore.

I think I have it resolved. Not sure how, but seems to be resolved. I moved the original project files out to another folder and it worked from there. Then I moved them back and added that one file to the project and it still worked. I added a few more to get all the dependencies into the project and it still works.

Thank you for your trouble. Now that I've got my business logic compiled I can start work on the UI. I might be back regarding the Dephi "List index out of bounds (-1)" error now that I know the sources work everywhere else.