Windows/Island .fx file compatibility broke with .2539?

This used to WORK with .2525 (Windows/Island).

A.exe dependent on B.fx - And, with .2539, while building A, the compiler complains a lot of functions (defined in B.fx) are missing, something like below:

1>------ Build started: Project: GraphInfo, Configuration: Debug ------
1>C:\DEVLIBS\TensorFlow-Island\Demos\ApiSamples\Src\GraphInfo.pas(35,20): error E46: Unknown identifier "LoadGraph"
1>C:\DEVLIBS\TensorFlow-Island\Demos\ApiSamples\Src\GraphInfo.pas(44,9): error E46: Unknown identifier "PrintOps"
1>C:\DEVLIBS\TensorFlow-Island\Demos\ApiSamples\Src\GraphInfo.pas(47,9): error E46: Unknown identifier "DeleteGraph"

I didn’t change any code, just upgrading Elements from .2525 to .2539, and now everything breaks.

What changed is the default visibility for methods. @mh we had a switch to get the old behavior right?

Yes. something like DefaultGlobalsToPublic. It’s in the docs and in the Project Settings (unser Delphi Compatibility, even though it will affect all languages).

That said, i recommend marking the ones you want public as public, rather than setting the switch

After setting DefaultGlobalsToPublic = true, everything is good as expected. Thank you for the advice - I should have thought that.

1 Like