Kotlin/Native : How to import entire GTK4 Libs and headers to Kotlin Native C Interop?

I am learning C Interop with Kotlin Native. I successfully imported my sample C program using .Deffile and executed the code in kotlin

So, I am thinking about import GTK4 libs, which is in C, to Kotlin/Native project and try a GTK app there

But since GTK4 have lot of header files and linking libs, I don’t know how to import them

I successfully executed GTK4 sample program in CLion C++ project.

But need to know how to import the GTK4 libs and headers to Kotlin/Native project

My Cmake in Clion project

cmake_minimum_required(VERSION 3.24) project(HexEditor) set(CMAKE_CXX_STANDARD 20) find_package(PkgConfig REQUIRED) pkg_check_modules(GTK4 REQUIRED gtk4) include_directories(${GTK4_INCLUDE_DIRS}) link_directories(${GTK4_LIBRARY_DIRS}) add_definitions(${GTK4_CFLAGS_OTHER}) add_executable(HexEditor main.cpp) target_link_libraries(HexEditor ${GTK4_LIBRARIES}) 

How to map them in .deffile of Kotlin/Native ?

submitted by /u/RageshAntony
[link] [comments]