Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

New Variable to support wx-config in MSys2 MinGW

<< < (9/9)

ollydbg:
The discussion was in year 2022, but it looks like I need to make a conclusion in year 2024.

1, I can define a global compiler variable(gcv) in the "Menu->Settings->Global variables" dialog.

If I'm using msys2's gcc, and the library is installed by pacman, I can set a gcv named wx_config like below:


--- Code: ---wx-config-msys2.exe --prefix=$(TARGET_COMPILER_DIR)

--- End code ---

If I'm using a wx library build myself, and I can set the wx_config gcv like below:


--- Code: ---wx-config.exe --prefix=E:/code/wxWidgets-3.2.4 --wxcfg=gcc_dll/mswud --debug

--- End code ---

Note that the "--debug" option or the "--wxcfg=gcc_dll/mswud" depends on what kinds of wx library did you built. Maybe you are using release build, so the "--debug" option can be removed, and the correct option could be: "--wxcfg=gcc_dll/mswu".


2,
Now, in your cbp build options, you need to write such options:

For compiler options, you can write:


--- Code: ---`$(#WX_CONFIG) --cflags`

--- End code ---

For resource compiler options, you can write:


--- Code: ---`$(#WX_CONFIG) --rcflags`

--- End code ---

For linker options, you can write:


--- Code: ---`$(#WX_CONFIG) --libs all`

--- End code ---

Note either wx-config.exe or wx-config-msys2.exe was built from the

eranif/wx-config-msys2: wx-config tool for MSYS2 based installation of wxWidgets using the mingw64 repository


BTW:

It looks like when using a gcv, the "#" should be used, so the below command will cause errors.


--- Code: ---`$(WX_CONFIG) --libs all`
--- End code ---

BTW2:

You must use the Backtick in the compiler options.


 

Navigation

[0] Message Index

[*] Previous page

Go to full version