So, this is a bit of a crap shot, but I have a .gpr
file that came as part of a legacy code package. There is a considerable amount of C and C++ code that is linked in during the build.
By itself, the package works just fine. However, if I change the Main
file from the current main to a different main -- one that incidentally has a certain apparently unnecessary with
statement in it, the project build fails with the following message:
Error Message:
gprbuild: link of test_main.2.ada failed
Besides different code in the Main
procedure itself (the code is not part of the problem), the only difference between the two files is the removal of this single with
directive. If it's there, the build succeeds. If I comment it out, the build fails. Note that the compiler doesn't notice a problem, because none of the code in Main appears to need it.
Any idea why this is?