Author Topic: Please help to tell me the structure of the SourceCode of CB  (Read 2701 times)

Offline liudeyun1988

  • Single posting newcomer
  • *
  • Posts: 2
Please help to tell me the structure of the SourceCode of CB
« on: January 14, 2013, 10:18:45 am »
Hello everyone,

I am a new user of CodeBlocks and I found it really wonderfull. Now I am using it to do all my cpp learning work and if someday I will do a project I will also use it.

So, since I have learned some cpp skills, I would like to do something like a project by myself and my college classmates. All I can think is to modify and add some features about Code Blocks to make it easier for me to use.

However, there are two problems I have met, and I really hope that you guys can help me.

First, when I download the source code of CB, I unziped it with winrar, forgive me that I am using it under Windows. After that, I used CB itself to load the project file which is a .cbp file in the direction of F:\codeblocks_12.11-1\codeblocks-12.11release8629\src\CodeBlocks.cbp
After that, CB tells me that there is a global argument not defined in the project whose name is wx. And I re-read the download hint and find the following sentence:
When opening a Code::Blocks project file it will usually ask you to define the root of the global compiler variable named "wx" which you simply point to the extracted folder from that archive.
Therefore I just add a base direction to F:\codeblocks_12.11-1\codeblocks-12.11release8629, is that right? After that there is another global argument not defined and I did the same thing. Sorry I forgot the name of it. But at least for now I don't have to define any argument. Hope you can tell me if I did this right.

Second, I am sorry to tell you that I have no experience in developing. All what I have done is to learn and do some exercises after every chapter in the book. Therefore I do not know how to read this so so big project! This is my second problem, I think that if I want to modify some feature, the first thing I need to do is to get to know the whole project, and I really want to because I think reading other one's code can still help me learn a language further.
So could you guys tell me how I can read this project, in what sequence, I even don't know where is the main function.

Thanks a lot if any one can help here!

Plus, you can call me Allen for my English name!

Thanks again, waiting for your information!

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Please help to tell me the structure of the SourceCode of CB
« Reply #1 on: January 14, 2013, 10:35:52 am »
As first if you really want to build C::B by yourself to modify it, you should read this: http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows .

Starting to do something really meningful on C::B without any experience with (at least small) projects will be very hard I think.

Nevertheless, a startpoint can be found here:
http://wiki.codeblocks.org/index.php?title=Developer_documentation

Developping a plugin as first project to modify C::B is probably more interesting, and the most plugins are less complex and therefore easier to understand.

Offline liudeyun1988

  • Single posting newcomer
  • *
  • Posts: 2
Re: Please help to tell me the structure of the SourceCode of CB
« Reply #2 on: January 14, 2013, 12:14:08 pm »
Yes, you are right.

I do not expect that I will succeed in the first place, but just want to start doing something not only reading the book. Because while you are reading, you are also forgetting I think.

I will not jump into the project directly to write code or modify it, I shall read the code understanding it first.

Thank you very much for the helpful link and guideness you have provided, hope we can be friends and chat more often!