User forums > General (but related to Code::Blocks)
codeblocks cbp projects for wx samples
AndrewCot:
I have never seen or used the "execution_dir". As such I would delete it, unless it is really required. You can comment it out for the time being (<!-- Option execution_dir="../minimal" -->).
In the C::B plugin build project files some did not have an entry for the "working_dir", but where it did exist it was set to the same directory as the "output" where I looked. I would either remove it or set it to $(TARGET_OUTPUT_DIR) so that you do not have to update two lines in the project file going forward if you change the output directory.
Some other changes could be:
1. As they are sample apps I would change the compiler options to enable debugging and no optimisation (-g -O0 -ggdb) plus remove the linker "-s" option.
2. Add a "<Option default_target="TBA" />"
3. Remove the target "<Option compiler="gcc" />" option so that there is only one at the project level
I have not done this or tried this, but you could add a <ExtraCommands> before to check that the $(#WX_CONFIG) is defined and if not the use the script expansion facility to pop up a message dialog to indicate that they have to set the global variable. See https://wiki.codeblocks.org/index.php/Variable_expansion for the script expansion info/example.
BTW I should update my project files to change the working_dir to $(TARGET_OUTPUT_DIR). I will update my bulk CBP app to make the change in the next day or two.
ollydbg:
--- Quote from: AndrewCot on September 17, 2022, 05:38:26 am ---I have never seen or used the "execution_dir". As such I would delete it, unless it is really required. You can comment it out for the time being (<!-- Option execution_dir="../minimal" -->).
In the C::B plugin build project files some did not have an entry for the "working_dir", but where it did exist it was set to the same directory as the "output" where I looked. I would either remove it or set it to $(TARGET_OUTPUT_DIR) so that you do not have to update two lines in the project file going forward if you change the output directory.
Some other changes could be:
1. As they are sample apps I would change the compiler options to enable debugging and no optimisation (-g -O0 -ggdb) plus remove the linker "-s" option.
2. Add a "<Option default_target="TBA" />"
3. Remove the target "<Option compiler="gcc" />" option so that there is only one at the project level
I have not done this or tried this, but you could add a <ExtraCommands> before to check that the $(#WX_CONFIG) is defined and if not the use the script expansion facility to pop up a message dialog to indicate that they have to set the global variable. See https://wiki.codeblocks.org/index.php/Variable_expansion for the script expansion info/example.
BTW I should update my project files to change the working_dir to $(TARGET_OUTPUT_DIR). I will update my bulk CBP app to make the change in the next day or two.
--- End quote ---
Thanks for the suggestion, I will do what I believe is simple and make some find/replace operation. ;)
ollydbg:
Now, I see there are about 100 sample folders in the wx, and most of the samples can be built and run by opening the cbp(or the toplevel samples.workspace) and C::B now.
:)
ollydbg:
Some good news:
The cbp projects also works under the self build wx library.
For example, you local build wx library is in F:/code/wxWidgets-3.2.1, and you build command could be:
--- Code: ---mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 VENDOR=cb
--- End code ---
You need the "wx-config.exe" from https://github.com/eranif/wx-config-msys2
What I need to do is:
Open the C::B's Menu->Settings->Global variables
Change the wx_config's base value to something like:
--- Code: ---wx-config.exe --prefix=F:/code/wxWidgets-3.2.1 --wxcfg=gcc_dll/mswu
--- End code ---
Then, you can build those samples linking to you local build wx.
Navigation
[0] Message Index
[*] Previous page
Go to full version