- "Build current file" would offer to attempt to compile and link a file if it is the only file in a project (same as "Build in this case) or if it is not in a project.
If we do this I see one issue: We will have
tons of newbies reporting "undefined references" because they didn't understand that it will need more than linking to compile e.g. a hello world OpenGL console application, even if it is in one file. Note that
a lot people start with code that requires SDK's (include files / libraries)
you don't now when provided a single compilation unit, only!
That was basically a driver for the wizards: They at least create a project that is fully defined and has all options/libs so you can compile it successfully.
So - if you offer to build a file without a project please
always present a warning in
bold,
red, font size "
huge" that this trial most likely will fail due to missing include files and/or undefined references and that the only way out is through a project. You may make this an AnnoyingDialog, if you want to, so users can disable it.
Another option would be to scan the compiler's/linker's response for such kind of errors in general and in case there are, always present this message box.
Otherwise our forum will be flooded.