I am trying to include GLib2 in my CLion C project on Windows. I have installed glib2.0 via pacman on Msys2. The include (#include <glib-2.0/glib.h>
) get's recognized by CLion.
My problem is that the include's in the glib.h
are not getting recognized.
Error:
C:/msys64/mingw64/include/glib-2.0/glib.h:30:10: fatal error: glib/galloca.h: No such file or directory
30 | #include <glib/galloca.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
But these 2 files exist on the filesystem:
glib-2.0/glib.h
glib-2.0/glib/galloca.h
CMakeLists.txt
cmake_minimum_required(VERSION 3.16)
project(task_2 C)
set(CMAKE_C_STANDARD 99)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
include_directories(BEFORE "C:/msys64/mingw64/include/glib-2.0" "C:/msys64/mingw64/lib/glib-2.0/include")
add_executable(main src/main.c)
target_link_libraries(main ws2_32)