Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
Even without actually compiling cb with llvm/clang you can benefit A LOT from its toolbox to find errors and dubious code.

1) Use the clangd_client cb-plugin. I only activate it temporarily, look at its findings and deactivate it afterwards due to its early stage.
2) Use clang-tidy as a "compiler" on any c++ project from within cb. Like with compiler warnings, clicking onto one jumps to the corresponding code line. This one I use very often.  I started using it with cb over 10 years ago.
3) Use scan-build from the commandline when building cb or any other project that compiles makefiles (e.g. via cmake). Gives a nice report.

Apart from llvm/clang I still recommend the cb-plugin for cppcheck.

The tools do have false positives. You can configure .clang-tidy. I disabled some warnings but in general I like to keep warnings on. At spots with false positives you can apply local suppressions (NOLINT, NOLINTNEXTLINE, cppcheck-suppress etc.). When using one of the tools for the first time on a larger codebase you might be flooded with warnings. Don't dispair. One strategy to attack the list systematically is to disable all but one type of warning. Fix those and proceed with the next type of warning. This might also happen after an update of one of the tools. A week ago, llvm forked clang-23 and started to provide packages for clang-24. The latter added a new check for [misc-const-correctness]. I like it.


2
Looks like Morten is working on building C::B for clang/arm. Recent svn changs shows many fixes the warnings.
3
I also see this kind of message in my console windows in my own built application, which is built against the wx library from msys2/mingw64 platform. I see the wx version is:

https://packages.msys2.org/base/mingw-w64-wxwidgets3.2
4
It might be useful to compile Code::Blocks with the clang compiler as the warnings and once in a while the errors exposed are somewhat different. What think ye?
5
Combining Code::Blocks r13927 with wxWidgets-3.2.11 results in the above mentioned note being popped up during initialization of debug versions of both CB and wxWigets. The stack trace at this point is:
Code
#0 ??	png_compare_ICC_profile_with_sRGB (png_ptr=0x8f9b2a0, profile=0x8f2b3c0 "", adler=60355580) (C:\msys64\home\NateJoe\wxWidgets\wxRegEx_changes\NewConfig\wxWidgets-3.2.11\src\png\png.c:2391)
#1 0x7ffebdc91aac wx_png_icc_set_sRGB(png_ptr=0x8f9b2a0, colorspace=0x8f9b760, profile=0x8f2b3c0 "", adler=60355580) (C:\msys64\home\NateJoe\wxWidgets\wxRegEx_changes\NewConfig\wxWidgets-3.2.11\src\png\png.c:2434)
#2 0x7ffebdcaa776 wx_png_handle_iCCP(png_ptr=0x8f9b2a0, info_ptr=0x8ca9e10, length=0) (C:\msys64\home\NateJoe\wxWidgets\wxRegEx_changes\NewConfig\wxWidgets-3.2.11\src\png\pngrutil.c:1595)
#3 0x7ffebdc97586 wx_png_read_info(png_ptr=0x8f9b2a0, info_ptr=0x8ca9e10) (C:\msys64\home\NateJoe\wxWidgets\wxRegEx_changes\NewConfig\wxWidgets-3.2.11\src\png\pngread.c:225)
#4 0x7ffebd801127 (anonymous namespace)::wxPNGImageData::DoLoadPNGFile(this=0x5fc9c0, image=0x5fd5d0, wxinfo=...) (C:\msys64\home\NateJoe\wxWidgets\wxRegEx_changes\NewConfig\wxWidgets-3.2.11\src\common\imagpng.cpp:322)
#5 0x7ffebd801a7f wxPNGHandler::LoadFile(this=0x290fa10, image=0x5fd5d0, stream=..., verbose=true) (C:\msys64\home\NateJoe\wxWidgets\wxRegEx_changes\NewConfig\wxWidgets-3.2.11\src\common\imagpng.cpp:431)
#6 0x7ffebd7f4593 wxImage::DoLoad(this=0x5fd5d0, handler=..., stream=..., index=-1) (C:\msys64\home\NateJoe\wxWidgets\wxRegEx_changes\NewConfig\wxWidgets-3.2.11\src\common\image.cpp:2870)
#7 0x7ffebd7f4b2c wxImage::LoadFile(this=0x5fd5d0, stream=..., type=wxBITMAP_TYPE_ANY, index=-1) (C:\msys64\home\NateJoe\wxWidgets\wxRegEx_changes\NewConfig\wxWidgets-3.2.11\src\common\image.cpp:2946)
#8 0x7ffea91806c0 cbLoadImageFromFS(image=..., filename=..., bitmapType=wxBITMAP_TYPE_ANY, fs=...) (C:\msys64\home\NateJoe\CodeBlocks\codeblocks-code-r13927-trunk_Just3211\src\sdk\globals.cpp:1143)
#9 0x7ffea91807c5 cbLoadBitmap(filename=..., bitmapType=wxBITMAP_TYPE_ANY, fs=0x0) (C:\msys64\home\NateJoe\CodeBlocks\codeblocks-code-r13927-trunk_Just3211\src\sdk\globals.cpp:1158)
#10 0x7ffe496c9f3d wxsResourceTree::wxsResourceTree(this=0x8ca7120, Parent=0x8ca64f0) (C:\msys64\home\NateJoe\CodeBlocks\codeblocks-code-r13927-trunk_Just3211\src\plugins\contrib\wxSmith\wxsresourcetree.cpp:81)
#11 0x7ffe496c3e6c wxSmith::BuildBrowsers(this=0x7057c00) (C:\msys64\home\NateJoe\CodeBlocks\codeblocks-code-r13927-trunk_Just3211\src\plugins\contrib\wxSmith\wxsmith.cpp:196)
#12 0x7ffe496c2cf2 wxSmith::OnAttach(this=0x7057c00) (C:\msys64\home\NateJoe\CodeBlocks\codeblocks-code-r13927-trunk_Just3211\src\plugins\contrib\wxSmith\wxsmith.cpp:102)
#13 0x7ffea90e5f47 cbPlugin::Attach(this=0x7057c00) (C:\msys64\home\NateJoe\CodeBlocks\codeblocks-code-r13927-trunk_Just3211\src\sdk\cbplugin.cpp:73)
#14 0x7ffea91a7db1 PluginManager::AttachPlugin(this=0x63667d0, plugin=0x7057c00, ignoreSafeMode=false) (C:\msys64\home\NateJoe\CodeBlocks\codeblocks-code-r13927-trunk_Just3211\src\sdk\pluginmanager.cpp:203)
#15 0x7ffea91b03ae PluginManager::LoadAllPlugins(this=0x63667d0) (C:\msys64\home\NateJoe\CodeBlocks\codeblocks-code-r13927-trunk_Just3211\src\sdk\pluginmanager.cpp:1202)
#16 0x7ff60ff41cec MainFrame::ScanForPlugins(this=0x338fa10) (C:\msys64\home\NateJoe\CodeBlocks\codeblocks-code-r13927-trunk_Just3211\src\src\main.cpp:1507)
#17 0x7ff60ff39731 MainFrame::MainFrame(this=0x338fa10, parent=0x0) (C:\msys64\home\NateJoe\CodeBlocks\codeblocks-code-r13927-trunk_Just3211\src\src\main.cpp:794)
#18 0x7ff60fed3992 CodeBlocksApp::InitFrame(this=0x19e5e0) (C:\msys64\home\NateJoe\CodeBlocks\codeblocks-code-r13927-trunk_Just3211\src\src\app.cpp:571)
#19 0x7ff60fed5416 CodeBlocksApp::OnInit(this=0x19e5e0) (C:\msys64\home\NateJoe\CodeBlocks\codeblocks-code-r13927-trunk_Just3211\src\src\app.cpp:810)
#20 0x7ff60fff0b55 wxAppConsoleBase::CallOnInit(this=0x19e5e0) (C:\msys64\home\NateJoe\wxWidgets\wxRegEx_changes\NewConfig\wxWidgets-3.2.11\include\wx\app.h:93)
#21 0x7ffebd56241d wxEntryReal(argc=@0x7ffebe5a17d0: 9, argv=0x19e000) (C:\msys64\home\NateJoe\wxWidgets\wxRegEx_changes\NewConfig\wxWidgets-3.2.11\src\common\init.cpp:481)
#22 0x7ffebd5fe890 wxEntry(argc=@0x7ffebe5a17d0: 9, argv=0x19e000) (C:\msys64\home\NateJoe\wxWidgets\wxRegEx_changes\NewConfig\wxWidgets-3.2.11\src\msw\main.cpp:179)
#23 0x7ffebd5fea84 wxEntry(hInstance=0x7ff60fed0000, nCmdShow=10) (C:\msys64\home\NateJoe\wxWidgets\wxRegEx_changes\NewConfig\wxWidgets-3.2.11\src\msw\main.cpp:339)
#24 0x7ff60fed2c53 WinMain(hInstance=0x7ff60fed0000, hPrevInstance=0x0, lpCmdLine=0xc4d28 "--debug-log --no-dde --no-check-associations --multiple-instance --no-splash-screen --verbose -p debug", nCmdShow=10) (C:\msys64\home\NateJoe\CodeBlocks\codeblocks-code-r13927-trunk_Just3211\src\src\app.cpp:381)
#25 0x7ff6100577aa main(argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) (D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexewin.c:62)
#26 0x7ff60fed115a __tmainCRTStartup() (D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:266)
#27 0x7fffa38a7374 KERNEL32!BaseThreadInitThunk() (C:\WINDOWS\System32\kernel32.dll:??)
#28 0x7fffa489cc91 ntdll!RtlUserThreadStart() (C:\WINDOWS\SYSTEM32\ntdll.dll:??)
#29 ?? ?? () (??:??)
The file being loaded as noted in level 4 stack frame is:
Code
src\\devel33_64\\share\\codeblocks/images/wxsmith/wxCommandLinkButton16.png"
It looks to me that this file derives from the submittal [r13869] * wxSmith: Add wxCommandLinkButton to the Standard palette. of June 26 last.
I have no problems combining CB r13927 with wxWidgets-3.3.3. Note that the wxWidgets 3.2 line incorporates the 1.6.37 version of libpng whereas the 3.3 line utilizes the 1.6.55 version. Does anyone else see this, or did I screw up? I don't usually bind against 3.2 widgets, but I wanted to see if my customized build process still works there
6
Help / Re: Debugger lldb.exe exits without running target executable
« Last post by everSome on Today at 04:12:03 am »
You can always check to see what your clang installation defaults to via
Code
clang -### -x c /dev/null
or
Code
clang -### -x c++ /dev/null
. If you see something other than
Code
"-debugger-tuning=gdb"
, you can override you installation's default via the options
Code
-ggdb
, or one of the other gdb variants
Code
-ggdb1, -ggdb2, ggdb3, etc
. If using an MSYS2 environment on Windows, you'll find that clang in these environments is setup to use gdb by default.
7
Spam reported to moderator.
9
Hi, my name is John. I study at a big university.

I was playing games on my University computer. The game is Tetris. It is cool game. I love it. I cannot install new games because I don't know admin password. So I was playing games. I was about to win. I had arranged all my blocks and only one last I block and I will get the tetris score -- clear 4 blocks at once.

Then suddenly this dialog box comes in saying that I should stop playing games and go back to work. But I promise I will write my code after clearing this one level. I want to play games now. But the computer is saying that I have to wait 59 more minutes.
five nights at freddy's 2
How can I disable it? I don't want that annoying feature. How can I disable that. Thank you.
Choose: Setting -> Environment and Select "C::B Games"
10
Having never used libraries before, I followed a Stack Exchange guide to complete the installation.
----------------------------------------
escape road

Pages: [1] 2 3 4 5 6 ... 10