btzy / nativefiledialog-extended

Cross platform (Windows, Mac, Linux) native file dialog library with C and C++ bindings, based on mlabbe/nativefiledialog.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

undefined reference to *gtk something*

GreedyTactician opened this issue · comments

Can't build the project. Getting undefined reference.

Tried to fix it by half haphazardly throwing the following cmake code I found online but it didn't work:
FIND_PACKAGE ( PkgConfig REQUIRED )
PKG_CHECK_MODULES( GTK REQUIRED gtk+-3.0 )
INCLUDE_DIRECTORIES ( ${GTK_INCLUDE_DIRS} )
include_directories(${GTK3_INCLUDE_DIRS})
link_directories(${GTK3_LIBRARY_DIRS})
add_definitions(${GTK3_CFLAGS_OTHER})
...
target_link_libraries(app PUBLIC ${GTK3_LIBRARIES})

libgtk-3-dev is installed an up to date.

It might help to take a look the CMakeLists file in the test folder, as well as how other projects import NFDe. The information you have provided is too vague to give any definite answer.

Thank you