6 comments
Comment actions Permalink

Please use include_directories command in your CMakeLists.txt. Please find out more in our web help: https://www.jetbrains.com/help/clion/2016.3/quick-cmake-tutorial.html.

0
Comment actions Permalink

Please use the following command in your CMakeLists.txt:

include_directories(<path_to_the_folder_where_your_header_is>)

and reload CMake after that.

0
Comment actions Permalink

When you say "path", I suppose you don't mean "C:\MinGW\include\graphics"? Because apparently the backslashes are creating a problem in CMake.txt.

 

0
Comment actions Permalink

@Canestis please use double backslashes, like this:

include_directories("C:\\MinGW\\include\\graphics")
1
Comment actions Permalink

@Anna Falevskaya Many thanks! The library is now included! However another problem came up.

When I try to compile a code, which is 100% correct and working on other systems and/or IDEs, these errors show up (look at attachment). Any ideas?

0
Comment actions Permalink

@Canestis I assume you need to include a related library to your project. Please try adding the following line in the CMakeLists.txt file after add_executable() command:

target_link_libraries (<target_name> <path_to_the_folder_where_the_library_is>)
0

Please sign in to leave a comment.