Recent Posts

Pages: 1 ... 5 6 7 8 9 [10]
91
Using Code::Blocks / Re: Project dependent upon another project?
« Last post by Miguel Gimenez on June 25, 2024, 06:56:28 pm »
You can create a project with two targets (Service and UI) and a virtual one including both.
92
Using Code::Blocks / Project dependent upon another project?
« Last post by Sephiroth on June 25, 2024, 06:50:53 pm »
I did this regularly with MSVS 2005, but have not messed with it in ages. I am building a cross-platform utility that will allow users to backup saves/config/etc from any game whether they are on Windows or Linux. This will consist of two separate projects. Both must build for the complete solution.

One is a service that monitors for specified programs to be run and backs up their data when they start (you start game A, it sees this, and backs up whatever the user specified). This is literally a Windows service that has no UI and will be the same under Linux.

The other is a wxWidgets project that will provide a UI to specify games (executables) and what to backup for each game. This simply writes a configuration file that the service reads when it starts or when it restarts. This is crucial for making the project easy enough for non-techs to use.

The master project will build each of the child projects and (if possible) package the outputs of said projects into an installer or tgz for users to install. The master project will not have any actual code to build. It just builds the two child projects and then builds the installer.

How can I accomplish this? Also, would it be possible to somehow tie this entire thing to my Github so it lives there and I can allow others access to the code?
93
Plugins development / Re: Code completion using LSP and clangd
« Last post by sodev on June 25, 2024, 02:42:42 pm »
I would check wxUSE_STL, wxUSE_STD_CONTAINERS_COMPATIBLY, and wxUSE_STD_CONTAINERS values.

The error message looks like a string conversion error, none of these options affect string conversion.

And, of course wxUSE_UNICODE should be 1

I don't think it is possible to build a current wxWidgets without that, i think i saw that some setup headers forcefully set this define to 1 even if u manually set it to 0.

Either compatibility with previous wxWidgets versions has been disabled or more likely wxUSE_UNSAFE_WXSTRING_CONV was disabled. If it was the latter, it would be a good idea to update the code, because using this automatic conversion can lead to fancy errors.
94
Plugins development / Re: Code completion using LSP and clangd
« Last post by stahta01 on June 25, 2024, 11:46:48 am »
Hi Pecan,
     Today I use GCC 14.1 with wx 3.2.5 to build CB, but I suddenly got some errors when building Clangd_client.
   
Code
J:\123\CodeBlocksNightlySrc\codeblocks_sfmirror\src\plugins\contrib\clangd_client\src\codecompletion\parser\parser.cpp||In member function 'bool Parser::LSP_GetSymbolsByType(json*, std::set<LSP_SymbolKind>&, std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, LSP_SymbolKind, int> >&)':|
J:\123\CodeBlocksNightlySrc\codeblocks_sfmirror\src\plugins\contrib\clangd_client\src\codecompletion\parser\parser.cpp|3667|error: invalid user-defined conversion from 'wxString' to 'char' [-fpermissive]|
J:\123\wxWidgets-3.2.5-cb\include\wx\string.h|1635|note: candidate is: 'wxString::operator const wchar_t*() const' (near match)|
J:\123\wxWidgets-3.2.5-cb\include\wx\string.h|1635|note:   no known conversion from 'const wchar_t*' to 'char'|
W:\SoftwareDevelopmentTools\mingw32\include\c++\14.1.0\bits\basic_string.h|840|note:   initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'|
J:\123\CodeBlocksNightlySrc\codeblocks_sfmirror\src\plugins\contrib\clangd_client\src\codecompletion\parser\parser.cpp||In member function 'void Parser::WalkDocumentSymbols(json&, wxString&, int&, std::set<LSP_SymbolKind>&, std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, LSP_SymbolKind, int> >&)':|
J:\123\CodeBlocksNightlySrc\codeblocks_sfmirror\src\plugins\contrib\clangd_client\src\codecompletion\parser\parser.cpp|3879|error: invalid user-defined conversion from 'wxString' to 'char' [-fpermissive]|
J:\123\wxWidgets-3.2.5-cb\include\wx\string.h|1635|note: candidate is: 'wxString::operator const wchar_t*() const' (near match)|
J:\123\wxWidgets-3.2.5-cb\include\wx\string.h|1635|note:   no known conversion from 'const wchar_t*' to 'char'|
W:\SoftwareDevelopmentTools\mingw32\include\c++\14.1.0\bits\basic_string.h|840|note:   initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'|
  How to fix this? Thanks.
  Edit: I just changed the 'name' in line 3667 and 3879 in parser.cpp to 'name.c_str()', and errors disappeared.
   I find that there are several other errors about the same; I remember that I did some changes in wx/msw/setup.h, maybe they influenced the compatibility of wxString and std::string.

I am also using mingw 14.1.0. with wxWidgets 3.2.5 (no modifications), but cannot reproduce this error.

Can you give us steps to reproduce the error?
I believe the Nightly is using the same without errors.
Do you get the error using the nightly build?

I would check wxUSE_STL, wxUSE_STD_CONTAINERS_COMPATIBLY, and wxUSE_STD_CONTAINERS values.
And, of course wxUSE_UNICODE should be 1 unless you wish to have a nightmare trying to have it set to 0 and fixing all the problems.

Tim S.
95
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on June 25, 2024, 06:55:35 am »
Hi Pecan,
     Today I use GCC 14.1 with wx 3.2.5 to build CB, but I suddenly got some errors when building Clangd_client.
   
Code
J:\123\CodeBlocksNightlySrc\codeblocks_sfmirror\src\plugins\contrib\clangd_client\src\codecompletion\parser\parser.cpp||In member function 'bool Parser::LSP_GetSymbolsByType(json*, std::set<LSP_SymbolKind>&, std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, LSP_SymbolKind, int> >&)':|
J:\123\CodeBlocksNightlySrc\codeblocks_sfmirror\src\plugins\contrib\clangd_client\src\codecompletion\parser\parser.cpp|3667|error: invalid user-defined conversion from 'wxString' to 'char' [-fpermissive]|
J:\123\wxWidgets-3.2.5-cb\include\wx\string.h|1635|note: candidate is: 'wxString::operator const wchar_t*() const' (near match)|
J:\123\wxWidgets-3.2.5-cb\include\wx\string.h|1635|note:   no known conversion from 'const wchar_t*' to 'char'|
W:\SoftwareDevelopmentTools\mingw32\include\c++\14.1.0\bits\basic_string.h|840|note:   initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'|
J:\123\CodeBlocksNightlySrc\codeblocks_sfmirror\src\plugins\contrib\clangd_client\src\codecompletion\parser\parser.cpp||In member function 'void Parser::WalkDocumentSymbols(json&, wxString&, int&, std::set<LSP_SymbolKind>&, std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, LSP_SymbolKind, int> >&)':|
J:\123\CodeBlocksNightlySrc\codeblocks_sfmirror\src\plugins\contrib\clangd_client\src\codecompletion\parser\parser.cpp|3879|error: invalid user-defined conversion from 'wxString' to 'char' [-fpermissive]|
J:\123\wxWidgets-3.2.5-cb\include\wx\string.h|1635|note: candidate is: 'wxString::operator const wchar_t*() const' (near match)|
J:\123\wxWidgets-3.2.5-cb\include\wx\string.h|1635|note:   no known conversion from 'const wchar_t*' to 'char'|
W:\SoftwareDevelopmentTools\mingw32\include\c++\14.1.0\bits\basic_string.h|840|note:   initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'|
  How to fix this? Thanks.
  Edit: I just changed the 'name' in line 3667 and 3879 in parser.cpp to 'name.c_str()', and errors disappeared.
   I find that there are several other errors about the same; I remember that I did some changes in wx/msw/setup.h, maybe they influenced the compatibility of wxString and std::string.

I am also using mingw 14.1.0. with wxWidgets 3.2.5 (no modifications), but cannot reproduce this error.

Can you give us steps to reproduce the error?
I believe the Nightly is using the same without errors.
Do you get the error using the nightly build?
96
More software is making it's way on ARM64, will Code::Blocks do the same?
Not entirely sure if wxWidgets supports Windows on ARM64 yet.

Found an wxWidgets issue that mentions Windows and ARM64 has at least experimental support using Clang compiler.

Tim S.
97
General (but related to Code::Blocks) / Will Code::Blocks support Windows on ARM64?
« Last post by MichaelAgarkov on June 24, 2024, 03:41:23 pm »
More software is making it's way on ARM64, will Code::Blocks do the same?
Not entirely sure if wxWidgets supports Windows on ARM64 yet.
98
Plugins development / Re: cbvike -- A VIM like plugin
« Last post by MichaelAgarkov on June 24, 2024, 03:25:00 pm »
Will there be a new version of this plugin with support for newer versions of Code::Blocks? The current version of the plugin doesn't work with 20.03.
99
Plugins development / Re: Code completion using LSP and clangd
« Last post by Grit Clef on June 24, 2024, 07:18:25 am »
Hi Pecan,
     Today I use GCC 14.1 with wx 3.2.5 to build CB, but I suddenly got some errors when building Clangd_client.
   
Code
J:\123\CodeBlocksNightlySrc\codeblocks_sfmirror\src\plugins\contrib\clangd_client\src\codecompletion\parser\parser.cpp||In member function 'bool Parser::LSP_GetSymbolsByType(json*, std::set<LSP_SymbolKind>&, std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, LSP_SymbolKind, int> >&)':|
J:\123\CodeBlocksNightlySrc\codeblocks_sfmirror\src\plugins\contrib\clangd_client\src\codecompletion\parser\parser.cpp|3667|error: invalid user-defined conversion from 'wxString' to 'char' [-fpermissive]|
J:\123\wxWidgets-3.2.5-cb\include\wx\string.h|1635|note: candidate is: 'wxString::operator const wchar_t*() const' (near match)|
J:\123\wxWidgets-3.2.5-cb\include\wx\string.h|1635|note:   no known conversion from 'const wchar_t*' to 'char'|
W:\SoftwareDevelopmentTools\mingw32\include\c++\14.1.0\bits\basic_string.h|840|note:   initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'|
J:\123\CodeBlocksNightlySrc\codeblocks_sfmirror\src\plugins\contrib\clangd_client\src\codecompletion\parser\parser.cpp||In member function 'void Parser::WalkDocumentSymbols(json&, wxString&, int&, std::set<LSP_SymbolKind>&, std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, LSP_SymbolKind, int> >&)':|
J:\123\CodeBlocksNightlySrc\codeblocks_sfmirror\src\plugins\contrib\clangd_client\src\codecompletion\parser\parser.cpp|3879|error: invalid user-defined conversion from 'wxString' to 'char' [-fpermissive]|
J:\123\wxWidgets-3.2.5-cb\include\wx\string.h|1635|note: candidate is: 'wxString::operator const wchar_t*() const' (near match)|
J:\123\wxWidgets-3.2.5-cb\include\wx\string.h|1635|note:   no known conversion from 'const wchar_t*' to 'char'|
W:\SoftwareDevelopmentTools\mingw32\include\c++\14.1.0\bits\basic_string.h|840|note:   initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'|
  How to fix this? Thanks.
  Edit: I just changed the 'name' in line 3667 and 3879 in parser.cpp to 'name.c_str()', and errors disappeared.
   I find that there are several other errors about the same; I remember that I did some changes in wx/msw/setup.h, maybe they influenced the compatibility of wxString and std::string.
100
Plugins development / Re: Code completion using LSP and clangd
« Last post by christo on June 23, 2024, 07:13:13 pm »
BTW: Can you show the CPU usage reduction before/after applying this patch? Thanks.
@ollydbg Attaching perf output without and with the optimisation. perf is captured until full codeblocks project is parsed.
Pages: 1 ... 5 6 7 8 9 [10]