Recent Posts

Pages: 1 ... 5 6 7 8 9 [10]
91
Using Code::Blocks / Re: Project dependent upon another project?
« Last post by Sephiroth on June 25, 2024, 07:52:51 pm »
Okay, I think I see what that does, I am just used to a way that seems more logical. You'd create a project in MSVS and add all sub-projects. You could go into the master project and specify the build order of the sub-projects, whether or not they depended on each other. I am assuming this is not possible in CodeBlocks and that is why you are telling me to do the dependencies the way that you did. I was expecting something like MSVS and Borland, or even a few others I used in the past.
92
Using Code::Blocks / Re: Project dependent upon another project?
« Last post by cacb on June 25, 2024, 07:38:38 pm »
It is just a build order dependency. There is no automatic library linking or anything like that.

The workspace is not a project, it is a workspace containing projects and declaring possible project build dependencies. If you insist you could create a dummy project doing nothing but declaring dependency on projectA and ProjectB. But what I said does the same thing. 
93
Using Code::Blocks / Re: Project dependent upon another project?
« Last post by Sephiroth on June 25, 2024, 07:25:38 pm »
So in MSVS the master project would depend on project A and B in your example. It checks A and builds if needed, then it does the same for B. There's no way to do this in CodeBlocks? Making one project depend on another when it really does not WILL confuse me down the road. If I step away for a while and come back to it this strange chaining of dependencies will be a hold-up. Is there any way to make the master project check and build each sub-project one at a time?
94
Using Code::Blocks / Re: Project dependent upon another project?
« Last post by cacb on June 25, 2024, 07:09:32 pm »
Create a Code::Blocks workspace with multiple projects using same name build targets.

workspace-folder  (contains MyProjects.workspace)
       |
      +- projectA-folder   (contains projectA.cbp)
       |
      +- projectB-folder   (contains projectB.cbp)

Select "Properties" on ProjectB and go to "Project Dependencies..." at the bottom.
Declare ProjectB to depend on ProjectA. This info will be saved in the MyProjects.workspace file only.

When you build ProjectB , then projectA will be checked for necessary build first.
95
Using Code::Blocks / Re: Project dependent upon another project?
« Last post by Miguel Gimenez on June 25, 2024, 07:05:27 pm »
Read again my post, I am talking about two targets in one project.

Multiple projects can be joined in a workspace, but the target approach is better.
96
Using Code::Blocks / Re: Project dependent upon another project?
« Last post by Sephiroth on June 25, 2024, 06:59:43 pm »
Can you go into detail a bit? I can easily create individual projects but have NEVER tried anything involving multiple projects in CodeBlocks. Also, why do I need a virtual project if there is a real project targeting both?
97
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.
98
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?
99
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.
100
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.
Pages: 1 ... 5 6 7 8 9 [10]