Recent Posts

Pages: 1 2 3 [4] 5 6 7 8 9 10
31
Plugins development / Re: CB 25.02 included binaries do not support mingw clangd
« Last post by Wkerry on May 04, 2025, 01:26:41 am »
When using mingw64\bin if you get errors with cc1plus.exe on C:B startup then check if the "GNU GCC Compiler" installation directory is C:\msys64\mingw32 and if it is then change it to C:\msys64\mingw64 and the error goes away.
32
Plugins development / Re: CB 25.02 included binaries do not support mingw clangd
« Last post by Pecan on May 03, 2025, 09:18:35 pm »
What about the msys2 package : mingw-w64-x86_64-clang-tools-extra in which clangd is included inside msys64\mingw64\bin folder ? For me, msys64\clang64 contains only empty folders.
I don't see many problems with this package (but I can have missed them). Could you tell us more precisely some of those "spurious errors".

Firstly, msys2 packages do not have the problem. Only the WinLibs binaries installed with CB 25.03 have the problem.

That clang64 is empty is perfectly ok.

But mingw64\bin should contain clangd.exe, which is the correct executable to set for clangd_client.

Using the msys mingw64 packages are exactly what you want to do.

Here are some of the spurious errors when using the MinGW folder distributed with CB 25.03.

The following errors are caused by using the wrong resource lib
for mingw clangd.exe. Clangd is issueing all these errors because it's ignoring anonymouse namespace.
Some of the errors make absolutely no sense at all.

The error: "remark:'_sleep' is deprecated|" makes no sense at all for a statement like:
"    int pos = clangPath.find(fileSep+"lib"+fileSep);
"

Code
LSP diagnostics: ClangLocator.cpp|:|----Time: 12:02:21.037---- (20 diagnostics)|
ClangLocator.cpp|65|error:Use of undeclared identifier 'fileSepChar'|
ClangLocator.cpp|84|error:Use of undeclared identifier 'fileSep'|
ClangLocator.cpp|84|error:Use of undeclared identifier 'clangdexe'; did you mean 'clangdDir'? (fix available) change 'clangdexe' to 'clangdDir'|
ClangLocator.cpp|107|error:Use of undeclared identifier 'fileSep'|
ClangLocator.cpp|149|error:Use of undeclared identifier 'fileSep'|
ClangLocator.cpp|149|error:Use of undeclared identifier 'fileSep'|
ClangLocator.cpp|174|error:Use of undeclared identifier 'fileSep'|
ClangLocator.cpp|174|error:Use of undeclared identifier 'fileSep'|
ClangLocator.cpp|174|remark:'_sleep' is deprecated|
ClangLocator.cpp|186|error:Use of undeclared identifier 'fileSep'|
ClangLocator.cpp|313|error:Use of undeclared identifier 'clangdexe'|
ClangLocator.cpp|317|error:Use of undeclared identifier 'fileSep'|
ClangLocator.cpp|351|error:Use of undeclared identifier 'fileSep'|
ClangLocator.cpp|381|error:Use of undeclared identifier 'fileSep'|
ClangLocator.cpp|396|error:Use of undeclared identifier 'fileSep'|
ClangLocator.cpp|413|error:Use of undeclared identifier 'clangdexe'|
ClangLocator.cpp|456|error:Use of undeclared identifier 'LLVM_Dirmaybe'|
ClangLocator.cpp|599|error:Use of undeclared identifier 'wxFound'; did you mean 'wxRound'? (fix available) change 'wxFound' to 'wxRound'|
ClangLocator.cpp|599|remark:'wxRound<int>' is deprecated: rounding an integer is useless|
ClangLocator.cpp|5|warning:Included header cstdint is not used directly (fix available) remove #include directive|
LSP diagnostics: ccoptionsdlg.cpp|:|----Time: 12:02:24.299---- (4 diagnostics)|
codecompletion\ccoptionsdlg.cpp|575|error:Use of undeclared identifier 'clangdexe'|
codecompletion\ccoptionsdlg.cpp|582|error:Use of undeclared identifier 'LLVM_Dirmaybe'|
codecompletion\ccoptionsdlg.cpp|582|error:Use of undeclared identifier 'clangdexe'|
codecompletion\ccoptionsdlg.cpp|636|error:Use of undeclared identifier 'clangdexe'|
LSP diagnostics: client.cpp|:|----Time: 12:02:25.385---- (22 diagnostics)|
LSPclient\client.cpp|398|error:Use of undeclared identifier 'clangdexe'|
LSPclient\client.cpp|434|error:Use of undeclared identifier 'fileSep'|
LSPclient\client.cpp|434|error:Use of undeclared identifier 'fileSep'|
LSPclient\client.cpp|434|remark:'_sleep' is deprecated|
LSPclient\client.cpp|438|error:Use of undeclared identifier 'fileSep'|
LSPclient\client.cpp|438|error:Use of undeclared identifier 'clangdexe'|
LSPclient\client.cpp|438|remark:'_sleep' is deprecated|
LSPclient\client.cpp|560|error:Use of undeclared identifier 'GetstdUTF8Str'; did you mean 'GetwxUTF8Str'? (fix available) change 'GetstdUTF8Str' to 'GetwxUTF8Str'|
LSPclient\client.cpp|560|error:No viable conversion from 'const wxString' to 'std::string' (aka 'basic_string<char>')|
LSPclient\client.cpp|560|error:Use of undeclared identifier 'GetstdUTF8Str'; did you mean 'GetwxUTF8Str'? (fix available) change 'GetstdUTF8Str' to 'GetwxUTF8Str'|
LSPclient\client.cpp|560|error:No viable conversion from 'const wxString' to 'std::string' (aka 'basic_string<char>')|
LSPclient\client.cpp|741|error:Use of undeclared identifier 'fileSep'|
LSPclient\client.cpp|742|error:Use of undeclared identifier 'fileSep'|
LSPclient\client.cpp|743|error:Use of undeclared identifier 'fileSep'|
LSPclient\client.cpp|744|error:Use of undeclared identifier 'fileSep'|
LSPclient\client.cpp|797|error:Use of undeclared identifier 'StdString_EndsWith'|
LSPclient\client.cpp|817|error:Use of undeclared identifier 'StdString_Contains'|
LSPclient\client.cpp|818|error:Use of undeclared identifier 'StdString_Contains'|
LSPclient\client.cpp|822|error:Use of undeclared identifier 'stdFound'|
LSPclient\client.cpp|1074|error:Use of undeclared identifier 'stdFound'|
LSPclient\client.cpp|1128|error:Use of undeclared identifier 'StdString_Format'|
LSPclient\client.cpp|1|error:Too many errors emitted, stopping now|
LSP diagnostics: codecompletion.cpp|:|----Time: 12:02:26.280---- (25 diagnostics)|
codecompletion\codecompletion.cpp|488|error:Use of undeclared identifier 'ns_DefaultCompilerMasterPath'|
codecompletion\codecompletion.cpp|489|error:Use of undeclared identifier 'ns_DefaultCompilerMasterPath'|
codecompletion\codecompletion.cpp|612|error:Use of undeclared identifier 'ns_DefaultCompilerMasterPath'|
codecompletion\codecompletion.cpp|613|error:Use of undeclared identifier 'ns_DefaultCompilerMasterPath'|
codecompletion\codecompletion.cpp|1031|error:Use of undeclared identifier 'wxFound'; did you mean 'wxRound'? (fix available) change 'wxFound' to 'wxRound'|
codecompletion\codecompletion.cpp|1031|remark:'wxRound<int>' is deprecated: rounding an integer is useless|
codecompletion\codecompletion.cpp|1052|error:Use of undeclared identifier 'wxFound'; did you mean 'wxRound'? (fix available) change 'wxFound' to 'wxRound'|
codecompletion\codecompletion.cpp|1052|remark:'wxRound<int>' is deprecated: rounding an integer is useless|
codecompletion\codecompletion.cpp|1055|error:Use of undeclared identifier 'wxFound'; did you mean 'wxRound'? (fix available) change 'wxFound' to 'wxRound'|
codecompletion\codecompletion.cpp|1055|remark:'wxRound<int>' is deprecated: rounding an integer is useless|
codecompletion\codecompletion.cpp|1063|error:Use of undeclared identifier 'wxFound'; did you mean 'wxRound'? (fix available) change 'wxFound' to 'wxRound'|
codecompletion\codecompletion.cpp|1063|remark:'wxRound<int>' is deprecated: rounding an integer is useless|
codecompletion\codecompletion.cpp|1187|error:Use of undeclared identifier 'ns_DefaultCompilerMasterPath'|
codecompletion\codecompletion.cpp|3078|error:Use of undeclared identifier 'clangdexe'|
codecompletion\codecompletion.cpp|3093|error:Use of undeclared identifier 'clangdexe'|
codecompletion\codecompletion.cpp|3438|error:Use of undeclared identifier 'STXstring'; did you mean 'String'? (fix available) change 'STXstring' to 'String'|
codecompletion\codecompletion.cpp|3446|error:Use of undeclared identifier 'STXstring'; did you mean 'String'? (fix available) change 'STXstring' to 'String'|
codecompletion\codecompletion.cpp|3448|error:Use of undeclared identifier 'STX'|
codecompletion\codecompletion.cpp|3449|error:Use of undeclared identifier 'STXstring'|
codecompletion\codecompletion.cpp|3450|error:Use of undeclared identifier 'STX'|
codecompletion\codecompletion.cpp|3453|error:Use of undeclared identifier 'STXstring'; did you mean 'String'? (fix available) change 'STXstring' to 'String'|
codecompletion\codecompletion.cpp|3521|error:Use of undeclared identifier 'STX'|
codecompletion\codecompletion.cpp|3524|error:Use of undeclared identifier 'STX'|
codecompletion\codecompletion.cpp|1|error:Too many errors emitted, stopping now|
codecompletion\codecompletion.cpp|14|warning:Included header iterator is not used directly (fix available) remove #include directive|


33
[Edit: A more important related bug is it fails to find the clangd.exe in the MINGW installation folder of an CB installed with Mingw compiler.

How did clangd.exe get installed with MINGW?
None of my Mingw folders contains clang.exe along with any of it's resources.

Do you mean the ...\msys64_18.1.8\mingw64\ folder? (or similar versions)?

On Windows using the CB25.03 installer with MINGW GCC compiler it also has the clangd.exe and other clang stuff installed.
The auto detection does not find it.

Edit:
Code
$(CodeBlocks)\MinGW\bin\clangd.exe

Tim S.

The installer does not install a clangd.exe that supports Mingw.
The clangd included in those binaries is for the clang compiler only.
Using the clangd.exe included in those binaries with Mingw will cause spurious (incorrect) error messages.

If you're using Mingw, use the Msys2 Mingw64/bin/clangd.exe instead.

Do not mix the clang compiler clangd with the Mingw clangd.

okay
34
Plugins development / Re: CB 25.02 included binaries do not support mingw clangd
« Last post by gd_on on May 03, 2025, 05:36:31 pm »
What about the msys2 package : mingw-w64-x86_64-clang-tools-extra in which clangd is included inside msys64\mingw64\bin folder ? For me, msys64\clang64 contains only empty folders.
I don't see many problems with this package (but I can have missed them). Could you tell us more precisely some of those "spurious errors".
35
Using Code::Blocks / Re: ClangD causing cc1plus.exe error pop up dialog on Windows
« Last post by Pecan on May 03, 2025, 05:32:56 pm »
[Edit: A more important related bug is it fails to find the clangd.exe in the MINGW installation folder of an CB installed with Mingw compiler.

How did clangd.exe get installed with MINGW?
None of my Mingw folders contains clang.exe along with any of it's resources.

Do you mean the ...\msys64_18.1.8\mingw64\ folder? (or similar versions)?

On Windows using the CB25.03 installer with MINGW GCC compiler it also has the clangd.exe and other clang stuff installed.
The auto detection does not find it.

Edit:
Code
$(CodeBlocks)\MinGW\bin\clangd.exe

Tim S.

The installer does not install a clangd.exe that supports Mingw.
The clangd included in those binaries is for the clang compiler only.
Using the clangd.exe included in those binaries with Mingw will cause spurious (incorrect) error messages.

If you're using Mingw, use the Msys2 Mingw64/bin/clangd.exe instead.

Do not mix the clang compiler clangd with the Mingw clangd.
36
Plugins development / CB 25.02 included binaries do not support mingw clangd
« Last post by Pecan on May 02, 2025, 08:06:24 pm »
The 25.03 MinGW binaries cannot be used as the clangd.exe target for Clangd_client plugin.

The WinLib MinGW clang resouces (lib/clang/19) are for use of the clang compiler only and not for projects buit with mingw (g++).

That's why msys2 separates mingw64 and clang64 into separate folders, so that each can have it's own bin and lib resources.

With the current WinLib distribution binaries, our clangd_client should not be specified to use the MinGW directory distributed with 25.03. It will cause all sort of spurious errors.
37
Help / Wxwidgets error opening existing project in 25.03
« Last post by kryptogenic on May 02, 2025, 07:26:52 pm »
I just installed 25.03 today and when I go to open an existing project i'm getting this error every time: A debugging check in this app has failed. I've attached a screenshot in pdf format as well.
38
Plugins development / Code format support in clangd_client plugin
« Last post by christo on May 02, 2025, 07:04:53 pm »
Many of the projects now a days use clang-format for formatting code. clangd has support for clang-format as well using textDocument/rangeFormatting  LSP request. Attaching patch which adds a  context menu item " Format use Clangd" and does the formatting on selecting that.
39
Help / Re: CMakeLists.txt and Code::Blocks
« Last post by stahta01 on May 02, 2025, 03:42:30 pm »
I use the first option "Use default native compilers", so nothing to fill manually and almost everything is correctly set.
For cross compiling, I suppose you have to set manually a few things, but sorry, as I don't do that, I can't help you more.
Better have a look on a cmake forum if it exists.
40
Help / Re: CMakeLists.txt and Code::Blocks
« Last post by gtafan on May 02, 2025, 03:28:58 pm »
Pages: 1 2 3 [4] 5 6 7 8 9 10