BS"D
When I just open a file, without a project context, almost all the options under "build", "debug" are graid out.
Any ideas?
Thanks,
Dani
Aside from holding a bunch of files together, a project contains important information about what it means to "build" that project. Things like what the built program should be named, where it should go, where header files can be found, whether it needs debugging info and what optimization level it should undergo.
So the answer I think you're looking for is that one would typically create a project, even if it's just for one file. That's the norm for all IDEs I've used, anyway.
If an IDE you've used has a feature to "build and run whatever file is open", please let this forum know about it. It could become a feature.
Building using the default options that you can set in your compiler preferences can be done with "Compile current file", and once it is built, the program can be run using "Run" too.
Debugging (and several other things) does not work without a project. No, this won't be added.
Thanks,
Anjuta can compile, run & (i think) debug single files.
Very convenient for scholar environments when programs are sporadic and short.
Dani
Personally, i always have a project named 'quicktests' that use for throw-away 1 file programs. Just select-all, delete, type new program (or copy/paste).
I just use the terminal for such one-offs. I'm in linux, so:
g++ -o executable_name the_file.cpp
./executable_name
And voila! But, yeah, once you use code::blocks you have incurred an overhead and why fight the framework? I just make a folder for the simple little one-off scripts, and then in the same folder I will also start projects. It's easy to tell them apart.