User forums > General (but related to Code::Blocks)
Happy New Year
ollydbg:
Hi, everyone, happy new year!
@Pecan, good work!
I would like to try this plugin if you release it.
Is it this?
https://sourceforge.net/p/cb-clangd-client/code/HEAD/tree/
AndrewCot:
Happy new year and best wishes.
@pecan excellent work.
I have integrated the code into my unofficial installer and uploaded the installer to SF (https://sourceforge.net/projects/unofficial-cb-installers/). I have only tested that I can configure and it runs like the existing code completion plugin.
The changes I had to do were:
1. Fix compiler errors in client.cpp that did not include the wc_str() to convert wxString for use by std::fstream
2. I included the SF src at the C::B src\plugin level like the codecompletion is in a new directory (\src\plugins\clangd_client)
4. Created a new ClangdClient_wx31_64.cpb project and updated it for my local build process and updated the cbp so it does not use the zipResources.bat
5. Updated the main workspace to reference the new ClangdClient_wx31_64.cpb file
6. Updated the NSIS installer to add the plugin
Changes that still need to be done that I spotted are:
1) Fix compiler warning (I used GCC 11.2)
2) Add support for building under Linux, Mac and Windows x86.
3) Either keep this as a separate plugin or incorporate it into the core plugin set. (My quick integration is a half way house as in it is a separate plugin, but not in the contrib directory)
4) Add plugin files to the Debain, Mac and windows installer scripts/process.
5) Test installers works and the plugin works after installing using installer
6) Two potential bugs I spotted while the codecompletion plugin is still supported:
a) You can enable the code completion plugin after the clangd_client is enabled.
b) If you disable the clangd_client and enable the codecompletion then C::B crashes if you try to open the Settings->editor sub menu
If this plugin is to replace the codecompletion plugin then we could live with these until the codecompletion plugin is retired.
7) The clangd_client.dll is 39MB.... Need to check out why it is so big.
The following is what is needed to get the plugin working with MSYS2:
1) Install MSYS 2 clang packages:
pacman -S mingw-w64-clang-x86_64-toolchain
2) Configure for use:
a) In the Settings->editor select Clangd_Client settings.
b) In the C/C++ parser tab change the LLVM directory to the following or where you have the clangd.exe installed):
C:\msys64\clang64\bin
Pecan:
Wow !! Thanks guys. Didn't expect such enthusiasm. :>)
That plugin @ https://sourceforge.net/p/cb-clangd-client/code/HEAD/tree/ is an early version I used before adding Linux support. I now have it working on both windows and linux. I'll upload that to SourceForge this week as soon as (I remove all my asm("int3") traps and) re-testing on both systems.
@ AndrewCot : thanks for all the suggestions. I'll get to work on 'em.
killerbot:
I would make a core plugin out of it, because code completion is a big feature most developers really want to be excellent.
Out existing code completion is already for years, let's be honest, old crap :-(
It fell behind the moment c++11 was introduced.
And I think it is a main reason for people to choose eclipse or vscode.
AndrewCot:
@Pecan
I have made some more changes in order to add the plugin to the core and as such here is some more feedback:
1) I updated to use -std=gnu++17 in the CodeBlocks_wx31_64.cbp project file as the code does not build with C++11.
2) The client.cpp does not build with the -DCB_PRECOMP compiler option. I had to add the following block and then it successfully built:
#include "sdk_precomp.h"
#ifndef CB_PRECOMP
..... existing WX and CB header files
#endif
@all
Are there any known issues with moving to C++17 to build C::B?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version