I have a problem with pkg-config --libs gtk + -3.0 When I call: pkg-config pkg-config --libs gtk + -3.0 get this list: -LC: / msys64 / mingw64 / lib -lgtk-3 -lgdk-3 -lz -lgdi32 -limm32 -lshell32 -lole32 -Wl, -luuid -lwinmm -ldwmapi -lsetupapi -lcfgmgr32 -lpangowin32-1.0 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobl- lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl. Unfortunately my IDE cannot find the files: -ldwmapi und -Wl.
It’s a single option; there is no space after the comma. “-Wl,-luuid” does exactly the same thing that “-luuid” does (I don’t know why the authors of the GDK library didn’t use the simpler version). You want your IDE to look for that library.
I can’t answer your question because it depends on how your IDE can be configured.
The “GNU GCC Compiler” profile doesn’t know about MSYS2 – none of the compiler selections does. You must create a new one for MSYS2:
Go to Settings -> Compiler... -> Global compiler settings.
Select the “Cygwin GCC” compiler.
Make a copy of it. Name the new one “mingw64 GCC”. Set it as the default.
Go to the “Toolchain executables” tab. Point the “Compiler’s installation directory” to "C:\msys64\mingw64". Add "C:\msys64\usr\bin" to “Additional Paths”.
Go to your project’s Build options.... Click on the project’s name in the left box.
Select the “mingw64 GCC” compiler. Click OK. When Code::Blocks asks, “Do you want to use the same compiler for all the project’s build targets too?”, click “Yes”.