User forums > Using Code::Blocks

ClangD causing cc1plus.exe error pop up dialog on Windows

<< < (2/3) > >>

gd_on:
Your installation look strange. If your rename solves the problem, it's probably because you use something inside mingw32, so you mix 32 and 64 bits exes. Check the paths and their order.
I use also msys2 distribution, also with clangd which is inside c:\msys64\mingw64\bin (as installed by mingw-w64-x86_64-clang-tools-extra msys2 package). As I use only 64 bits, all folders like C:\msys64\mingw32, C:\msys64\clang32 or C:\msys64\clang64 contain only empty folders, so for me, no way to use something there.

stahta01:
Somewhere there is a setting for which clangd is used by Code::Blocks check that is correct.

Edit: Best guess "settings->Editor"

To devs: Feature request that the setting of "$(TARGET_COMPILER_DIR)\bin\clangd.exe" works for clangd plugin; the clang plugin already has the code; but, the value  of $(TARGET_COMPILER_DIR) is not know at the point in time; might not be possible for it to be known

Edit2: Looks like code is too complex for me to understand ClgdCompletion::OnAppStartupDone

Tim S.

stahta01:
Possible work around what I am guessing is the cause.

A. Add Global var of "MSYS2_MINGW64" set base to "C:\msys64\mingw64"
1. Settings -> global variables
2. Add Global var of "MSYS2_MINGW64"
3. Set base to correct location ex. "C:\msys64\mingw64"

B. Set path of clang exec to use to "$(#MSYS2_MINGW64)\bin\clangd.exe"
1. Settings -> Editor
2. Select clangd_client from left pane
3. Tab "C/C++ parser"
4. Set exec to use to "$(#MSYS2_MINGW64)\bin\clangd.exe"

Tim S.

Pecan:

--- Quote from: stahta01 on April 24, 2025, 03:52:02 pm ---Somewhere there is a setting for which clangd is used by Code::Blocks check that is correct.

Edit: Best guess "settings->Editor"

To devs: Feature request that the setting of "$(TARGET_COMPILER_DIR)\bin\clangd.exe" works for clangd plugin; the clang plugin already has the code; but, the value  of $(TARGET_COMPILER_DIR) is not know at the point in time; might not be possible for it to be known

Edit2: Looks like code is too complex for me to understand ClgdCompletion::OnAppStartupDone

Tim S.

--- End quote ---

I'll look to see if this is workable.
I vaguely remember that I tried this, but the needed macros were unknown at project load which is where the clangd.exe needs to be set.
But I'll look at it again anyway.

stahta01:

--- Quote from: Pecan on April 24, 2025, 06:41:28 pm ---
--- Quote from: stahta01 on April 24, 2025, 03:52:02 pm ---Somewhere there is a setting for which clangd is used by Code::Blocks check that is correct.

Edit: Best guess "settings->Editor"

To devs: Feature request that the setting of "$(TARGET_COMPILER_DIR)\bin\clangd.exe" works for clangd plugin; the clang plugin already has the code; but, the value  of $(TARGET_COMPILER_DIR) is not know at the point in time; might not be possible for it to be known

Edit2: Looks like code is too complex for me to understand ClgdCompletion::OnAppStartupDone

Tim S.

--- End quote ---

I'll look to see if this is workable.
I vaguely remember that I tried this, but the needed macros were unknown at project load which is where the clangd.exe needs to be set.
But I'll look at it again anyway.

--- End quote ---

It does replace with global variable which means you are likely right and the value is empty at that time.

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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version