Author Topic: Making project is so inconvenient, isn't it?  (Read 12962 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Making project is so inconvenient, isn't it?
« Reply #15 on: April 21, 2012, 02:18:32 pm »
If you have a project you are in compile only mode. If you don't you're in compile-and-link mode.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline codeur

  • Multiple posting newcomer
  • *
  • Posts: 113
    • Code::Blocks EDU-Portable
Re: Making project is so inconvenient, isn't it?
« Reply #16 on: April 21, 2012, 02:59:37 pm »
... 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...

Morten, we have different users in mind:
I have the educational environment in mind (the Codeblocks-EP target audience) where this problem does not occur. There beginners usually write single file text based programs for several weeks before being guided by their teachers to write their first program using a simple graphics API. At that time they are introduced to the mysteries of APIs, SDKs and 3rd party libraries.

You are rather thinking of the self-learner who copies from the web into a new empty file some game code written for OpenGL or produced last century for turbo C++, clicks on "Build and run" and is angry at all these crappy messages that pop up onto the screen.
I have no idea what could be done in this case.

This automatic single-file default project is without doubt worth having in an educational distribution, but I agree that it may increase the self-learner's problems in the standard distribution.
« Last Edit: April 21, 2012, 03:16:47 pm by codeur »

Offline codeur

  • Multiple posting newcomer
  • *
  • Posts: 113
    • Code::Blocks EDU-Portable
Re: Making project is so inconvenient, isn't it?
« Reply #17 on: April 21, 2012, 03:12:27 pm »
If you have a project you are in compile only mode. If you don't you're in compile-and-link mode.

It makes sense now.
However I would rather: When you select "Compile current file": if you have a project you are in compile only mode. If you don't, a new default project is created, also followed by compile only mode. If you want to also link, just press "Build" (the existing "Build" button or menu entry) after successful compilation.

Much better! Thanks for that.

The behaviour (when there is no project) can be enabled or not in a Settings option as suggested earlier by Morten. This would cancel his misgivings regarding that feature in trunk.
« Last Edit: April 21, 2012, 03:27:32 pm by codeur »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Making project is so inconvenient, isn't it?
« Reply #18 on: April 21, 2012, 03:34:34 pm »
The behaviour (when there is no project) can be enabled or not in a Settings option as suggested earlier by Morten. This would cancel his misgivings regarding that feature in trunk.
Why, just implement his suggestions.
Adding options to delegate to the user every little decision you have to make is just plain wrong.
Apple (I'm not their fan) are in fact right in this regard, the software just had to work...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline codeur

  • Multiple posting newcomer
  • *
  • Posts: 113
    • Code::Blocks EDU-Portable
Re: Making project is so inconvenient, isn't it?
« Reply #19 on: April 21, 2012, 03:55:07 pm »
. . .
Why, just implement his suggestions.
Adding options to delegate to the user every little decision you have to make is just plain wrong.
Apple (I'm not their fan) are in fact right in this regard, the software just had to work...

Just a sec... In the Codeblocks-EP distribution I am going to implement the single file default project creation, whatever happens in trunk. I don't need to have it as a settings option in that educational distribution.

In trunk, whether you use the patch and make it a settings option or not in the end depends on you, Morten and the rest of the team.
I just think that Morten's worries regarding self-learners are valid.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Making project is so inconvenient, isn't it?
« Reply #20 on: April 21, 2012, 04:17:27 pm »
I just think that Morten's worries regarding self-learners are valid.
It would make it easier for us if it the patch complete in the first place, I guess that's why oBFusCATed said:
Why, just implement his suggestions.
It wouldn't hurt educational (guided) newbies anyways to see such a warning. In fact - is could be even helpful if you didn't listen to your teacher... ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline carra

  • Multiple posting newcomer
  • *
  • Posts: 117
Re: Making project is so inconvenient, isn't it?
« Reply #21 on: April 24, 2012, 08:59:23 pm »
I noticed this as well, and this is one of the reasons I kept sticking to Dev-C++ for so long. It's nice to have many options when you need them: targets, releases, folder to separate different kinds of files... Great for large projects. But when you don't need them, it's simply too much.

I do a lot of experimenting and need to create MANY small test projects, with maybe 3 or 4 files. In those cases I don't need to have releases and I definitely don't want C::B to create 4 subfolders in every project.

Yes, I do know that you can disable all this on C::B, but it gets tiring to do it every time. I would rather have a simplified flavour of the "empty project" that works the opposite way: Give me all settings at the simplest by default and let me activate extras as needed, instead of making me think the more complex configurations when I'm just trying to keep it simple.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Making project is so inconvenient, isn't it?
« Reply #22 on: April 24, 2012, 09:15:04 pm »
Yes, I do know that you can disable all this on C::B, but it gets tiring to do it every time. I would rather have a simplified flavour of the "empty project" that works the opposite way: Give me all settings at the simplest by default and let me activate extras as needed, instead of making me think the more complex configurations when I'm just trying to keep it simple.
You can write your own project template or you can modify an existing one. They are simple squirrel scripts. To see their code - right click on a template -> edit script/source
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline carra

  • Multiple posting newcomer
  • *
  • Posts: 117
Re: Making project is so inconvenient, isn't it?
« Reply #23 on: April 24, 2012, 11:04:37 pm »
Yeah, I was able to access the script so that should work. I can give it a try, however I'm not familiar with squirrel or C::B scripting... I hope it's not too lengthy to learn

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Making project is so inconvenient, isn't it?
« Reply #24 on: April 25, 2012, 07:34:54 pm »
You can also create a project skeleton, that fits your needs and save it as user template ("File -> Save project as template" and "File -> New -> From template ...").

Offline carra

  • Multiple posting newcomer
  • *
  • Posts: 117
Re: Making project is so inconvenient, isn't it?
« Reply #25 on: April 25, 2012, 11:27:11 pm »
Thanks for the tip. I did try it before, but I was fooled by an alert window. It says that "the folder already contains files and they may be overwritten", and I interpreted that to mean that when using a template the projects create from it always kept the same file names that the template had... My mistake here.