Bad colors when using GTK+ 3 and clion

Hi,

I'm currently using clion and trying to use gtk+ 3 with clion. My project compile just fine but clion doesn't recognize any of the gtk function and mark them red every time.

My current cmakelists.txt is the following:

#setting the minimum required version of cmake
cmake_minimum_required(VERSION 3.6)
#naming the project
project(OldHelp)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")

# Use the package PkgConfig to detect GTK+ headers/library files
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
# Setup CMake to use GTK+, tell the compiler where to look for headers
# and to the linker where to look for libraries
include_directories(${GTK3_INCLUDE_DIRS})
link_directories(${GTK3_LIBRARY_DIRS})
# Add other flags to the compiler
add_definitions(${GTK3_CFLAGS_OTHER})

add_executable(OldHelp gui.c)

target_link_libraries(OldHelp ${GTK3_LIBRARIES})

 and hereis a picture of hos my main is displayed (verry simple example of gtk) :

0
Avatar
Permanently deleted user

Ok, restarting clion solve the problem.

0

请先登录再写评论。