Compilation failed with error in <filename>

Posted by Thomas Mercer-Hursh on 26-Jan-2012 16:36

I am a lot (310) of these messages doing compiles of a project.  Does it just mean that somewhere else in the problem messages there is an error reported so this file failed to compile?  I.e., fix the other error and this one goes away too?

All Replies

Posted by Matt Baker on 27-Jan-2012 09:16

It means that the compile of some program failed.

More specifically the COMPILER:ERROR flag was set to true or ERROR-STATUS:ERROR was set to true when trying to compile a program. Either because there was a compile error in what was being compiled, or a compile error in some dependency that caused the compiler to return an error.  They are supposed to go away when the actual error goes away and the file has been recompiled.  Warning messages from the compile will still show in the problems view but if the compiler generates  warning you won't get a failure message.

The message is there to handle such cases where the AVM tried to compile some dependency but that failed, so the file that was actually being requested by OEA to be compiled is considered failed as well.  For instance if you have a class that calls a method from another class, but that other class hasn't been compiled yet, so the AVM tries to compile it but fails due to some problem, so the original method invocation cannot be resolved so the original file fails to be compiled but the AVM doesn't necessarily spit out an error message related to the original file, but instead generates an error on the other class.  Inhale.  Fix the error in the dependency and recompile the primary file and the error messages will go away.  Same thing with include files.

Or the save into directory was invalid.  Which isn't a compilation problem, but a configuration problem.

The message is there to given an indication of which file actually had the problem in the case where the original file being compiled isn't the actual problem.

A few options if you don't like them:

Fix the compile error.

Fix the configuration problem.

In v11, if the file shouldn't be compiled, then add an exception in the build settings for the project so the file doesn't get compiled

Add a filter to the problems view to hide that one particular message.

Posted by Thomas Mercer-Hursh on 27-Jan-2012 11:21

Thanks.

BTW, that Exclude from Build in 11.0 is terrific, except for the part about selecting it causes a fresh build.  Annoying, when one has a couple of things to mark, especially since it seems to build all projects in the workspace.

This thread is closed