Author Topic: how to use code blocks  (Read 5116 times)

Offline biotech54

  • Single posting newcomer
  • *
  • Posts: 9
how to use code blocks
« on: May 19, 2017, 09:58:52 pm »
Is there a step by step tutorial on how to use all the features of code blocks?  I would really like to fully master this program.  I just started using codeblocks a few days ago.  It seems much simpler and user friendly than the other IDEs.   I understand only a very small handful of menu items.  I can't even figure out the simplest thing -
 how to create different versions of a program using codeblocks, so that i can test out each version separately.  I looked at the pdf manual on the codeblocks website, and it was really dry, skimpy, and essentially of no use.  The english grammar was really poor as well.  I googled for other manuals, but none seem to exist. Same with youtube, no videos on how to use codeblocks.  I really want a manual that will go into detail on each and every menu item, giving examples that i can try out to learn.  The alternative is to monkey with each menu item to try to decipher what it does, and when to effectively use it, which would take many years.  Why spend so much time writing an IDE which no one knows how to use?  I'm willing to pay for lessons btw, such as by skype.  Having written instructions makes learning so much easier though.  Maybe if i master this program, i will write such a book!  Thanks in advance for any advice.
Edward

Offline exchg

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: how to use code blocks
« Reply #1 on: May 19, 2017, 11:05:02 pm »

Offline biotech54

  • Single posting newcomer
  • *
  • Posts: 9
Re: how to use code blocks
« Reply #2 on: May 19, 2017, 11:56:59 pm »
Thanks, but as i said before, it's skimpy, and not useful at all.  It only covers a few menu items, out of probably 1,000 menu items.  This is written for someone that already knows how to use the program.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: how to use code blocks
« Reply #3 on: May 20, 2017, 12:32:20 am »
Codeblocks is a open source project, build by many volunteers, mostly experienced coder. For them most of the ui is self explaining, because it is the same for all C++ IDEs (i came a long time ago from VS6 (good old times) and learned everything by try and error). Codeblocks is developed in free time, and there is simply no time for writing documentation. You can help by start writing it ;) The wiki should be editable with the forum logins. If not please ask here for access.

The problem with english: I don't think that at the moment is one dev here who speaks native english...

You don't have to know every menu item to work with codeblocks. And if you have a problem just ask here. If it is a codeblocks related problem we will help you, if it is a coding error please ask on a c++ forum.

The most basic steps are described here: http://wiki.codeblocks.org/index.php/Creating_a_new_project and http://wiki.codeblocks.org/index.php/The_build_process_of_Code::Blocks


Quote
how to create different versions of a program using codeblocks, so that i can test out each version separately.
This is a philosophical question:
1) If you ask for different versions of the same program, use a cvs like git or svn. Manage your code with it and as soon as you focus codeblocks it will detect that the code has changed and will ask if you want reload the code/project. Hit yes and all is fine.

2) If you want to have multiple main functions (different programs)  then there are two main approaches:
2.1) Use a separate project for each program. This is recommended for beginners because it is the easiest way and does not have any complicated steps. You select the active project by double clicking on it in the Management/Projects panel (it will get Bold if activated).
2.2) Use separate targets in one project for every main file and activate only one c file per target. This is a bit complicated:
      1) Create a project
      2) Create your main.c/cpp files
      3) Project->Properties->Build Targets
      3.1) Hit the "Add" key for every main.c file and select at the bottom "Build target file" always only one main file.
      4) Close the dialog and select your build target in the drop down menu near the build button in the toolbar

Offline biotech54

  • Single posting newcomer
  • *
  • Posts: 9
Re: how to use code blocks
« Reply #4 on: May 20, 2017, 01:28:42 am »
I understand that the program is written by volunteers.  But, it still makes no sense to me.  A programmer spends hundreds of hours writing and debugging each menu item for the program.  However, he cannot not spend a single hour to document it.  You can document it in any language.  It can be easily translated to any other language.  Programmers who have been using a C++ IDE for many many years can probably guess how to use the menu items.  However, programmers who are new to using a C++ IDE are lost.  If no one can understand how the entire program works, then how can you find any volunteer programmers willing to improve the software.  Before any programmer can start tweeking a program, he better know how to use the entire program first.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: how to use code blocks
« Reply #5 on: May 20, 2017, 02:18:22 am »
Quote
However, he cannot not spend a single hour to document it
The code is documentation ;) Writing good documentation needs as much time as coding (if not more) and is a tedious process especially if it is not your native language...

What do you need documentation for?
File->New
Project->Build options->Compiler Settings->Compiler flags
Project->Build options->Pre/post build options
ecc...
This are all self explanatory names... Writing documentation for this is not necessary. As soon as you need this options you are experienced with the build process to know where to search. The experience comes with try and error....

Quote
If no one can understand how the entire program works, then how can you find any volunteer programmers willing to improve the software.  Before any programmer can start tweeking a program, he better know how to use the entire program first.
There are 100.000 weekly downloads and this forum is not crowded over with people who question the simple menu things, so this does not seem to be a problem....


However, i am not here to discuss this, the time for this discussion is simply wasted and it would be better to spend it to write documentation. There is not much documentation, this is a sad fact. The devs have not much time do write it. If you have the time we all would be happy if you could help. If you have a question i am happy to answer and help, but i will not discuss this future....

greetings

Offline exchg

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: how to use code blocks
« Reply #6 on: May 20, 2017, 07:08:25 pm »
However, programmers who are new to using a C++ IDE are lost.
IDE it is just GUI representation of common processes/commands for compiler/linker command line (except some text editor advantages).
IDE project file it is just some automation (batch of common commands and flags) for compiler.
So maybe this programmers(which are lost) better to learn how the compiler works first?
It's just philosophical reasoning ))
« Last Edit: May 20, 2017, 07:10:20 pm by exchg »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: how to use code blocks
« Reply #7 on: May 20, 2017, 08:53:56 pm »
I can't even figure out the simplest thing -
 how to create different versions of a program using codeblocks, so that i can test out each version separately.
1. create multiple targets that build separate executables
2. create a single target and add some command line arguments and some dispatching to different function in the main function
3. create separate projects and organize them in a workspace
4. use something like cmake to do similar things

Last time I've looked at the manual it had explanation for projects, targets and workspaces. Isn't this still the case?
(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 gd_on

  • Lives here!
  • ****
  • Posts: 797
Re: how to use code blocks
« Reply #8 on: May 21, 2017, 07:29:31 pm »
And what about http://www.codeblocks.org/user-manual even if it's outdated ?

gd_on
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).