Recent Posts

Pages: 1 [2] 3 4 5 6 7 ... 10
11
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on April 20, 2024, 10:39:08 pm »
After testing and tracing clangd_client and the miniAudio source I believe it will not be possible to pass that 4meg miniAudio.h file to clangd.

I have a relatively fast system, but clangd never finished parsing the header file before it crashed attempting to create a response file which would have been many times the size of the source file (about 24meg or more) after it formatted a response containing line/col/symbol/diagnostics/fix suggestions, etc.
If it didn't give out of memory, it sure would have caused Clangd_client to.

That header file will have to be broken up into multiple headers in order for clangd to handle it.

Note from opinionated self: I really do not consider creating a 4meg header file as acceptable software design. It's just going to create grief for anyone using it. If not now, certainly in the future.
yea that makes sense I guess. I think I'll have to break the miniaudio.h in like miniaudio1.h miniaudio2.h miniaudio3.h... for the plugin to not crash, no?

Yes, breaking up that huge header into multiple headers should do the trick.

12
Plugins development / Re: Code completion using LSP and clangd
« Last post by kakas on April 20, 2024, 09:02:48 pm »
After testing and tracing clangd_client and the miniAudio source I believe it will not be possible to pass that 4meg miniAudio.h file to clangd.

I have a relatively fast system, but clangd never finished parsing the header file before it crashed attempting to create a response file which would have been many times the size of the source file (about 24meg or more) after it formatted a response containing line/col/symbol/diagnostics/fix suggestions, etc.
If it didn't give out of memory, it sure would have caused Clangd_client to.

That header file will have to be broken up into multiple headers in order for clangd to handle it.

Note from opinionated self: I really do not consider creating a 4meg header file as acceptable software design. It's just going to create grief for anyone using it. If not now, certainly in the future.
yea that makes sense I guess. I think I'll have to break the miniaudio.h in like miniaudio1.h miniaudio2.h miniaudio3.h... for the plugin to not crash, no?
13
Plugins development / Re: Code completion using LSP and clangd
« Last post by kakas on April 20, 2024, 08:51:21 pm »
After testing and tracing clangd_client and the miniAudio source I believe it will not be possible to pass that 4meg miniAudio.h file to clangd.

I have a relatively fast system, but clangd never finished parsing the header file before it crashed attempting to create a response file which would have been many times the size of the source file (about 24meg or more) after it formatted a response containing line/col/symbol/diagnostics/fix suggestions, etc.
If it didn't give out of memory, it sure would have caused Clangd_client to.

That header file will have to be broken up into multiple headers in order for clangd to handle it.

Note from opinionated self: I really do not consider creating a 4meg header file as acceptable software design. It's just going to create grief for anyone using it. If not now, certainly in the future.
yea that makes sense I guess. I think I'll have to break the miniaudio.h in like miniaudio1.h miniaudio2.h miniaudio3.h... no?
14
Plugins development / Re: Code completion using LSP and clangd
« Last post by kakas on April 20, 2024, 08:39:17 pm »
I'll have a look at it.
Please attach your .cbp file for the project and your main.c  to a forum reply, so I can mirror what's happening.
Thanks for the report.
(sorry for the late reply, I lost track of time)
I had to change the file extension since the anything other than image and txt file isn't accepted. Miniaudio.txt is cbp and main.txt is main.c
15
check if mingw directory exist inside your CB install dir. if so, then
1) go to menu Settings->Compiler
2) In settings window move to toolchain executables tab
3)  Remove 'mingw32-' prefix for upper 4 apps
4) Check mingw path
5) enjoy
16
Announcements / successor of 20.03 available?
« Last post by TomS on April 20, 2024, 02:02:01 pm »
Hello Community,

I'm using B::C 20.03 since the first relaese and now I see that the nightly builds have included a lot of improvements over the last four years.
I'm woundering why there is no new release since 20.03? The compiler has changed, the wxwidgets have been changed to new version too,
but c::b  as official release (and binaries) is the same over the last four years.

Can we expect a new binary release of c::b soon?

Tanks in advance
TomS
17
Help / Re: Abbreviation plugin (auto completion) CTRL+J does not work under comments
« Last post by Pecan on April 20, 2024, 07:13:58 am »
Hi, when I try to enter some date information in the comment, I try to press "CTRL+J" key, and I see nothing happens if the caret is inside a comment.

It works OK if the caret is in a normal code fields.

I think it is very common if some one want to add date information in the comments. Can you reproduce this bug?

Any ideas?

Thanks.


PS:
I see there are two ways to use the "Abbreviation plugin", first I type the "now", and after that, I press the "CTRL+J", and the "now" becomes the actual date+time text string.

The other way is that I press the "CTRL+J", and a suggestion list is pop up, and I continuously type the "now", and hit the enter, the actual date+time string is entered in the editor.
Great find ! I didn't know that either.
18
Help / Abbreviation plugin (auto completion) CTRL+J does not work under comments
« Last post by ollydbg on April 20, 2024, 04:03:43 am »
Hi, when I try to enter some date information in the comment, I try to press "CTRL+J" key, and I see nothing happens if the caret is inside a comment.

It works OK if the caret is in a normal code fields.

I think it is very common if some one want to add date information in the comments. Can you reproduce this bug?

Any ideas?

Thanks.


PS:
I see there are two ways to use the "Abbreviation plugin", first I type the "now", and after that, I press the "CTRL+J", and the "now" becomes the actual date+time text string.

The other way is that I press the "CTRL+J", and a suggestion list is pop up, and I continuously type the "now", and hit the enter, the actual date+time string is entered in the editor.
19
Using Code::Blocks / Re: new project wizard fails to locate glfw3.h
« Last post by Vigor on April 20, 2024, 01:36:53 am »
Through trial and error, going down many rabbit holes, trying to understand the glfw3 project script I found a solution to the above problem.

I took the glfw3 folder with a copy of the glfw3.h file from my initial download and moved it until I found the right spot for it.   It goes in MinGW/Include/, so MINGW/Include/GLFW3/glfw3.h

Before trying this I tried to change the path in the script to where glfw3.h is and has been working for years but it didn't work.  In fact it still works for all of my old projects so there must be a better solution.

After completing the wizard I got a new project that doesn't complile.   It gives a lot of (i think) linking errors of undefined references such as

C:\Program Files\CodeBlocks\MinGW\lib/libglfw3.a(init.c.obj):init.c:(.text+0xb9): undefined reference to `__mingw_free'

In the above error line, one thing seems peculiar.   "MinGW\lib/libglfw3.a"  sometimes it is using forward slash and other times it is using backslash.    I have seen paths written with forward slashes or with back slashes but I think this is the first time I have ever seen a path written with a combination of forward and back slashes.

libglfw3.a is in the MinGW/LIB/ folder. (i didn't need to move it from where it has been for years)

I read a post on stack exchange which had an almost identical problem where it was determined that the original poster needed to update his GCC compiler.   I recently updated mine but I went ahead and updated it again and nothing changed.

Since I have two full installations of codeblocks on my computer, I wanted to try to start projects in both, then edit both scripts and compare them side by side looking for differences.   It wouldn't let me open both a once.  I can open one, then trying to execute the 2nd brings the window to the other to the front.

Is there a way to have 2 instances of codeblocks running at once?  It would often be useful if I could have multiple instances of codeblocks running at once.   It would be really great if each instance had a unique thumbnail and didn't stack in the taskbar.
20
Help / Re: Compiler Optimizations
« Last post by mikejp56 on April 20, 2024, 01:17:25 am »
Hi stahta01,
I did try to build using the optimizations 01, 02, and 03 with no success.
I obviously fat fingered the F_CPU define. I will retry that again without the D! This code is for a crystal controlled clock running at 16MHz. It keeps correct time without the F_CPU define.
I realized afterward that it is a compiler issue when I compiled the same exact c code in MPLABX (which I really do not like) and got the same warning from the compiler.
Regards,
mikejp56
Pages: 1 [2] 3 4 5 6 7 ... 10