Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
Why did you download a start using Code::Blocks?
70% the same as Miguel Gimenez.

1. I had to migrate to open source from Borland (many years ago).
1. Also I have to keep in mind multiplatform possibility.
1. For some time I used Dev-Cpp, but it was abandoned de-facto. Also it was underdeveloped.
1. There were some alternatives, but not good.
1. C::B was already operable with non-crucial issues. It also supported Fortran, which I need from time to time.
2
I am new and a real boy.

No bots here although I feel like it.

I am a noob to programming Computers but an expert at programming robots and plcs.

I started this on my main computer but i messed it up and now cannot pass the posts to this forum...well I cannot do many searches on that PC.

But my main PC it is the newest and best PC I own. This PC runs win 8 and I really hate Windows anything since XP and the resource pack I own.

So I decided to learn how to manipulate Windows and program my PCs so the operate my way not windows.

Blue
3
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on Yesterday at 06:26:06 pm »
Continuation of discussion from:
https://forums.codeblocks.org/index.php/topic,25383.msg173164.html#msg173164

Can you write a short example that we can use to re-create your problems?
For me, clangd_client does indeed provide the info you are having problems with.
With an example from you, we might be able to either show you how to get the info, or fix the problem.

My os is win7 , clangd.exe is  from latest version LLVM-16.0.5-win64 which  full installed ,compiler is winlibs-x86_64-mcf-seh-gcc-13.1.0-mingw-w64ucrt-11.0.0-r1,no msys . In CB , compiler settings is right  ,  search directories  is right .

My Project to test  clangd_client  is simplest  "hello world" , add several varialbes and simple classes , the program is normally compiling and running . clangd_client can jump to class( I defines myself) declaration and implementation rightly.  But  it  don't  give the right hint of member funtions , and a varialbe of string type it give a hint that is a int type.

if there is any setting and step I omit please instruct me .

Below is a part  info  of LSP messages
Code
LSP diagnostics: main.cpp|:|----Time: 15:16:19.218---- (5 diagnostics)|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|1|note:'iostream' file not found|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|8|warning:Using directive refers to implicitly-defined namespace 'std'|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|12|note:Unknown type name 'string'|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|25|note:Use of undeclared identifier 'cout'|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|25|note:Use of undeclared identifier 'endl'|
LSP diagnostics: Test1.h|:|----Time: 15:16:20.533---- (0 diagnostics)|
LSP diagnostics: Test.h|:|----Time: 15:16:21.815---- (0 diagnostics)|
LSP diagnostics: Test.cpp|:|----Time: 15:16:22.844---- (4 diagnostics)|
E:\workspace\testcode\test1\HelloMingw64\src\Test.cpp|2|note:'iostream' file not found|
E:\workspace\testcode\test1\HelloMingw64\src\Test.cpp|4|warning:Using directive refers to implicitly-defined namespace 'std'|
E:\workspace\testcode\test1\HelloMingw64\src\Test.cpp|18|note:Use of undeclared identifier 'cout'|
E:\workspace\testcode\test1\HelloMingw64\src\Test.cpp|18|note:Use of undeclared identifier 'endl'|
LSP diagnostics: main.cpp|:|----Time: 15:19:41.802---- (5 diagnostics)|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|1|note:'iostream' file not found|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|8|warning:Using directive refers to implicitly-defined namespace 'std'|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|12|note:Unknown type name 'string'|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|26|note:Use of undeclared identifier 'cout'|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|26|note:Use of undeclared identifier 'endl'|
LSP diagnostics: main.cpp|:|----Time: 15:19:51.121---- (12 diagnostics)|
......
......

@ myztmy

In order to be precise, we'll need you to paste your source code here between code tags. Paste the main.cpp code in your response using the "#" icon  above the face icons. For example the "#" icon produces code tags that look like this:
[ code ] your main.cpp source[/ code ] (without the spaces around "code".
The "#" icon and face icons appear when you  click on the "Reply" or "Quote" buttons.

I see that there are enough compile errors and warnings that it would confuse clangd. I think you're missing some #include statements. But we need to see your code first.

Regards
4
Nightly builds / Re: The 06 May 2023 build (13268) is out.
« Last post by Pecan on Yesterday at 06:22:19 pm »
Can you write a short example that we can use to re-create your problems?
For me, clangd_client does indeed provide the info you are having problems with.
With an example from you, we might be able to either show you how to get the info, or fix the problem.
@ myztmy
Let's take this conversation over to the Codeblocks clang_client discussion at  https://forums.codeblocks.org/index.php/topic,24357.0.html

We'll work on getting the problems fixed in that discussion thread.
5
Nightly builds / Re: The 04 June 2023 build (13311) is out.
« Last post by Neo on Yesterday at 05:22:54 pm »
Maybe clangd plugin is broken; it reports unrealistic 'errors'. See attached screenshot.

EDIT:
It seems clangd plugin conflicts with MSYS2 clangd (mingw-w64-clang-i686-clang-tools-extra). I switched back to winlibs clangd and it works like before.

You cannot mix a clang compiler with a clangd Mingw process or vice versa.
Both must be clang or Mingw.
Check your clangd setings at Settings>Editor>Clangd>C/C++Parser>SpecifyClangdExecutableToUse.

Also see the explanation at https://wiki.codeblocks.org/index.php/CB_Clangd_Client and seach for the keywords "Dont't mix".

I am not sure if I can understand what the wiki says. But the 'don't mix' rule is not always true.

clangd plugin:
C:\apps\gnu\winlibs\mingw32\bin\clangd.exe

I tried `C:\apps\gnu\MSYS64\mingw32` or `C:\apps\gnu\MSYS64\mingw64` and both work with clangd.
6
Nightly builds / Re: The 06 May 2023 build (13268) is out.
« Last post by myztmy on Yesterday at 10:13:11 am »
Can you write a short example that we can use to re-create your problems?
For me, clangd_client does indeed provide the info you are having problems with.
With an example from you, we might be able to either show you how to get the info, or fix the problem.

My os is win7 , clangd.exe is  from latest version LLVM-16.0.5-win64 which  full installed ,compiler is winlibs-x86_64-mcf-seh-gcc-13.1.0-mingw-w64ucrt-11.0.0-r1,no msys . In CB , compiler settings is right  ,  search directories  is right .

My Project to test  clangd_client  is simplest  "hello world" , add several varialbes and simple classes , the program is normally compiling and running . clangd_client can jump to class( I defines myself) declaration and implementation rightly.  But  it  don't  give the right hint of member funtions , and a varialbe of string type it give a hint that is a int type.

if there is any setting and step I omit please instruct me .

Below is a part  info  of LSP messages
LSP diagnostics: main.cpp|:|----Time: 15:16:19.218---- (5 diagnostics)|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|1|note:'iostream' file not found|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|8|warning:Using directive refers to implicitly-defined namespace 'std'|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|12|note:Unknown type name 'string'|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|25|note:Use of undeclared identifier 'cout'|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|25|note:Use of undeclared identifier 'endl'|
LSP diagnostics: Test1.h|:|----Time: 15:16:20.533---- (0 diagnostics)|
LSP diagnostics: Test.h|:|----Time: 15:16:21.815---- (0 diagnostics)|
LSP diagnostics: Test.cpp|:|----Time: 15:16:22.844---- (4 diagnostics)|
E:\workspace\testcode\test1\HelloMingw64\src\Test.cpp|2|note:'iostream' file not found|
E:\workspace\testcode\test1\HelloMingw64\src\Test.cpp|4|warning:Using directive refers to implicitly-defined namespace 'std'|
E:\workspace\testcode\test1\HelloMingw64\src\Test.cpp|18|note:Use of undeclared identifier 'cout'|
E:\workspace\testcode\test1\HelloMingw64\src\Test.cpp|18|note:Use of undeclared identifier 'endl'|
LSP diagnostics: main.cpp|:|----Time: 15:19:41.802---- (5 diagnostics)|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|1|note:'iostream' file not found|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|8|warning:Using directive refers to implicitly-defined namespace 'std'|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|12|note:Unknown type name 'string'|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|26|note:Use of undeclared identifier 'cout'|
E:\workspace\testcode\test1\HelloMingw64\main.cpp|26|note:Use of undeclared identifier 'endl'|
LSP diagnostics: main.cpp|:|----Time: 15:19:51.121---- (12 diagnostics)|
......
......
7
Nightly builds / Re: The 06 May 2023 build (13268) is out.
« Last post by Pecan on Yesterday at 06:45:52 am »
So I decide turning  to "Clangd_client" to see What effect it will have. It add some new functions and add a new class from class wizard no freeze . But it can't  give hint of Member functions  of variables which type defines in C++ standard library ( "Code completion 1.0" can do ) ,and sometimes it always gives  incorrect  hint , even reopen the project it can't return to normal ,you must restart CB . And some other bugs that  I 'am too lazy to elaborate here.  Let me try new version to see what improved.

But most importantly,  CB is free , so I  shouldn't  complaining too much. :-[ I wish CB will be as better as VScode.

Can you write a short example that we can use to re-create your problems?
For me, clangd_client does indeed provide the info you are having problems with.
With an example from you, we might be able to either show you how to get the info, or fix the problem.
8
Nightly builds / Re: The 06 May 2023 build (13268) is out.
« Last post by myztmy on Yesterday at 06:31:26 am »
By the way , the post of this forum  is  only  allowed contains english characters , not allowed chinese  characters , otherwise you can't sent out your post and always gets a ambiguous prompts "database error" .  It's a bit outdated in today's international trend.
9
Nightly builds / Re: The 06 May 2023 build (13268) is out.
« Last post by myztmy on Yesterday at 06:06:40 am »
So I decide turning  to "Clangd_client" to see What effect it will have. It add some new functions and add a new class from class wizard no freeze . But it can't  give hint of Member functions  of variables which type defines in C++ standard library ( "Code completion 1.0" can do ) ,and sometimes it always gives  incorrect  hint , even reopen the project it can't return to normal ,you must restart CB . And some other bugs that  I 'am too lazy to elaborate here.  Let me try new version to see what improved.

But most importantly,  CB is free , so I  shouldn't  complaining too much. :-[ I wish CB will be as better as VScode.
10
Nightly builds / Re: The 06 May 2023 build (13268) is out.
« Last post by myztmy on Yesterday at 05:50:53 am »
Which encoding does the file use?. Try converting it to other encoding with Notepad++

Do you have Code Completion enabled?
I have found the reason.When I disable the plug in "Code completion 1.0", the file is opened normally in this nightly builded vesion. But the plug in declares  only dealing  with  C/C++ language,  why it interfere with a txt file that not in any project ?

And also  disable "Code completion 1.0", add a new class from class wizard no more freeze in this version.
Pages: [1] 2 3 4 5 6 ... 10