Author Topic: Code::Blocks SDK documentation  (Read 13823 times)

slimmeke

  • Guest
Code::Blocks SDK documentation
« on: September 21, 2013, 05:34:22 pm »
Hey

I can't find any documentation about the CB SDK. Is there some docs or is it possible to generate some?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code::Blocks SDK documentation
« Reply #1 on: September 21, 2013, 06:02:54 pm »
There is src/sdk.doxy, probably you can use it to generate the SDK documentation. Other than that you can just inspect the headers.
(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!]

slimmeke

  • Guest
Re: Code::Blocks SDK documentation
« Reply #2 on: September 21, 2013, 06:26:57 pm »
Ok tnx that was it. I have generated the docs and it look good.

Offline comsytec

  • Multiple posting newcomer
  • *
  • Posts: 58
    • www.comsytec.com
Re: Code::Blocks SDK documentation
« Reply #3 on: November 28, 2013, 06:19:20 pm »
The C::B coding style is very readable. So read the sources. If you don't understand make debug build and try step through related part of code. This helped me a lot. Also I made C::B build linked with MSVCRTD.DLL to make it able tracing the heap allocation under Windows.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code::Blocks SDK documentation
« Reply #4 on: November 29, 2013, 12:48:32 am »
...Also I made C::B build linked with MSVCRTD.DLL to make it able tracing the heap allocation under Windows.
How do you do that? Do you use MSVC compiler?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Code::Blocks SDK documentation
« Reply #5 on: November 29, 2013, 03:20:19 am »
...Also I made C::B build linked with MSVCRTD.DLL to make it able tracing the heap allocation under Windows.
How do you do that? Do you use MSVC compiler?

FYI: The MinGW GCC Compiler normally uses the MS Runtime DLL without the D in it. I know there are ways to build MinGW to use different versions of the MS Runtime DLL (6/7/8/etc do not remember the default version number); no reason one will not permit using the debug variation.

Tim S.

 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code::Blocks SDK documentation
« Reply #6 on: November 29, 2013, 05:31:22 am »
Thank Tim.
As far as I know, the debug version of msvcrt.dll is only shipped with MSVC, am I right?

EDIT: see this link, winapi - Where is msvcrtd.dll? - Stack Overflow, it is not distributed.
« Last Edit: November 29, 2013, 08:54:44 am by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline comsytec

  • Multiple posting newcomer
  • *
  • Posts: 58
    • www.comsytec.com
Re: Code::Blocks SDK documentation
« Reply #7 on: November 29, 2013, 04:45:47 pm »
I don't remember but when you install couple of programs during life-time of your computer sometimes appearing files which I don't know where they came from. So the MSVCRTD.DLL was included in this way. First was the idea that I need it. Next step the MinGW runtime nor GCC does not support its linking. Changed the MinGW run-time and also made different spec file for GCC. If you start using MSVCRTD.DLL you cannot mix memory allocations without D. It corrupts the heap and then you get some kind of assertion message from run-time library. But despite of these things it is very useful. There was an idea at first time to share it but it possible only through MinGW integration. I'm not sure if it can work consistently by only copying some file to your MinGW install. But I don't understand why there in FSF don't add the MSVCRTD.DLL linking by default when you are using -g switch on the command line. If you want I can make compressed package (e.g. ZIP or similar) and share it through my website without MSVCRTD.DLL. I don't know if it is legal to share it.

Among other things I made this: (see attached file)
To make easily to switch between build configurations. Somewhere in this forum I mention about it but don't got any positive response for such change of compiler plugin.
« Last Edit: November 29, 2013, 04:57:44 pm by comsytec »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Code::Blocks SDK documentation
« Reply #8 on: November 30, 2013, 07:37:47 am »
To make easily to switch between build configurations. Somewhere in this forum I mention about it but don't got any positive response for such change of compiler plugin.
Did you post a patch on SF.net? (Hopefully its not only for 10.05.)
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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code::Blocks SDK documentation
« Reply #9 on: November 30, 2013, 08:44:56 am »
Some links: Using msvcrt debug version (msvcrtd) (with a msvcrtd.a attached in one reply.)

But I still don't know how to use it in current(newer) version of MinGW. @Comsytec: can you show us the details?

I would like to see the whether there are some memory leaks in our CB code by linking to msvcrtd.
« Last Edit: November 30, 2013, 08:54:48 am by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Code::Blocks SDK documentation
« Reply #10 on: November 30, 2013, 02:03:44 pm »
I would like to see the whether there are some memory leaks in our CB code by linking to msvcrtd.

I have used debug_new to find some pretty obscure memory leaks. Not sure how well it would work with wxWidgets apps...

http://sourceforge.net/projects/nvwa/

Offline comsytec

  • Multiple posting newcomer
  • *
  • Posts: 58
    • www.comsytec.com
Re: Code::Blocks SDK documentation
« Reply #11 on: November 30, 2013, 08:14:51 pm »
To make easily to switch between build configurations. Somewhere in this forum I mention about it but don't got any positive response for such change of compiler plugin.
Did you post a patch on SF.net? (Hopefully its not only for 10.05.)

No on SF.net not. In past I posted some package in this forum http://forums.codeblocks.org/index.php/topic,17299.0.html but I got only criticism about unneeded redundant feature for C::B and I not bothered with further. I know these changes not ideal but at least helps to me. Configurations shown on the picture are fixed and to change them requires further development.

Offline comsytec

  • Multiple posting newcomer
  • *
  • Posts: 58
    • www.comsytec.com
Re: Code::Blocks SDK documentation
« Reply #12 on: November 30, 2013, 08:23:58 pm »
Some links: Using msvcrt debug version (msvcrtd) (with a msvcrtd.a attached in one reply.)

But I still don't know how to use it in current(newer) version of MinGW. @Comsytec: can you show us the details?

I would like to see the whether there are some memory leaks in our CB code by linking to msvcrtd.

Ok next week will prepare package with MinGW where it is included for download here. And also must mention about that wxWidgets must be linked with also otherwise it is useless so I must also post updated wxWidgets source. This method solves monitoring of the malloc but not fully the new which can have lot of forms and replacing of debug version of heap allocations is achieved through preprocessing directives.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code::Blocks SDK documentation
« Reply #13 on: December 01, 2013, 04:19:09 pm »
I would like to see the whether there are some memory leaks in our CB code by linking to msvcrtd.

I have used debug_new to find some pretty obscure memory leaks. Not sure how well it would work with wxWidgets apps...

http://sourceforge.net/projects/nvwa/
Thanks, I have tried nvwa before, but I believe that nvwa need to build into wx's source to correctly report all memory leaks. E.g. most GUI window was allocated in user code by new wxXXXX, but released from wx's source.

I found another nice tool: drmemory http://www.drmemory.org/ , which looks good.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.