User forums > Using Code::Blocks

Making project is so inconvenient, isn't it?

<< < (3/6) > >>

oBFusCATed:
codeur: Why would you add another similar option? Why wouldn't you modify the existing one?

codeur:
@ oBFusCATed:
This is what I currently have in mind:
- "Compile current file" only compiles a file whether it is in a multiple file project or not. It makes no attempt at linking anything. That's essential and should remain. If there is a demand, I could in addition make this option create a project as below before compiling if the current file is not already in a project (presenting this as a yes/no option before creating the project).
- "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 the file is not in a project, a default empty (or console) project would be automatically created. The file would become the only file in the project before building. If the file is already in a multi-file project the option would not be available ("Build" is available for this).

At this stage I am listening to any alternative you want to suggest for the interface.

MortenMacFly:

--- Quote from: codeur on April 21, 2012, 08:46:03 am ---- "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.

--- End quote ---
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. ::)

oBFusCATed:
codeur:
I still don't see a reason to have two options make it as one and make it smart.
Having two options looking the same will be quite confusing.

codeur:

--- Quote from: oBFusCATed on April 21, 2012, 01:53:48 pm ---codeur:
... make it as one and make it smart.

--- End quote ---

Please explain. I do not understand how to combine those two options as one.
One compiles only, no matter what. The other compiles and if successful attempts to link into an executable. The user normally picks the option depending on where they are in the development cycle. I cannot see any way for an IDE to guess what a user wants there.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version