According to the Symbian documentation the checklib.exe is a static analysis tool for checking the consistent use of operator new in static libraries linked into dll or exe. This means that you should use the symbian way of operator new with (ELeave), or you should use the standard C++ way of operator new. In Qt apps you are in standard c++ world, and in Avkon apps you’re in Symbian c++ world.
The idea of checklib is pretty good. You might run into some troubles with the inconsistent use of new operator in out of memory situations, and debugging these errors can be time consuming. So getting a warning about them feels like a nice feature from the SDK.
The problem is that the checklib errors will fail your whole build, if an inconsistency is found (it’s not just a warning).Failing the build doesn’t really make any sense, since it’s a static code analysis tool. I think that I would like the checklib, if it would only give me a warning like “the way you’re using operator new is not consistent, see forum.nokia.com for more info”
But unfortunately the checklib will just fail the whole build. The worst part is that the tool itself doesn’t give you any hints what symbol to look at (where the problem is).
Here are some common error codes from checklib:
1 2 3 checklib error: "foo is incompatible with standard C++" checklib: error: not a COFF object: bad magic. checklib: error: file can not be found.
These errors just don’t help me even a bit, and I really don’t care that much about the OOM situations. I’m using a lot of my own memory hacks anyway, so I’m pretty much screwed in OOM anyway.
Here’s how you can remove this stupid tool from the SBSv1 build chain
Open files cl_bpabi.pm and cl_codewarrior.pm under \epoc32\tools
and modify the lines with:
1 $run_checklib = 1;
1 2 <pre class="brush: plain; title: ; notranslate" title=""> $run_checklib = 0;
If you already have a project in carbide, and you just found this page by googling the checklib related problems remember also to do the regular
1 2 abld really clean bld clean
Double check also that you don’t have anything related to to your project under \epoc32\build directory. If you can find a directory with your project name on it, delete it. You should get a working makefile under the build directory after recreating the project.
Comments powered by Disqus.