MSYS2 - wxWidgets - Code::Blocks

143 views
Skip to first unread message

Amn

unread,
Jun 23, 2022, 11:10:45 AM6/23/22
to wx-users

On my Windows 8.1 box, I have MSYS2 up and running, through it I have g++ and wxWidgets /*pacman -S mingw-w64-x86_64-wxWidgets*/

set up.

I have also installed Code::Blocks as a Windows application.

I have setup C::B to use MSYS2's GCC tool-chain.

I'd like to setup C::B to use MSYS2's wxWidgets lib(s) as well, but I can't find any tutorials about it.
Can anyone fill this gap? Any information would be much appreciated.

Thanks folks

--
Using Fire Fox and Thunderbird.
Developing for Android using Java, C/C++, HTM/CSS and SQLite as our platform has been exciting and most rewarding.
[ Ñ ]

Amn

unread,
Jun 23, 2022, 6:40:44 PM6/23/22
to wx-users

PB

unread,
Jun 24, 2022, 1:50:16 AM6/24/22
to wx-users
This is not a wxWidgets question but Code::Blocks question, best asked in their forums. IIRC, they have a couple of threads about using wxWidgets MSYS2 package with C:B.

The built-in C::B wxWidgets project wizard will not work with wxWidgets MSYS2 package, as it expects different folder structure as well as library names than MSYS2 package has.

Anyway, adding a library to a project is always the same. One must set preprocessor defines, compiler include folders, and linker folder and library names. This is described in wxWidgets documentation at https://docs.wxwidgets.org/trunk/plat_msw_install.html#msw_build_apps.

One can do it by hand, or use wx-config; ironically, AFAIK, the wx-config version working with MSYS2 package is provided by CodeLite.

If you are going to add the libraries by hand, do not forget that their order matters in the usual GCC manner. If you are not sure, the correct order is provided in the last chapter of my (in your case otherwise useless) guide at https://github.com/PBfordev/wxpbguide


Reply all
Reply to author
Forward
0 new messages