diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5c55efae..1ad32b2e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -262,7 +262,7 @@ if (use_libclang)
     add_definitions(${LLVM_DEFINITIONS})
     llvm_map_components_to_libnames(llvm_libs support core option)
     target_compile_definitions(doxygen PRIVATE ${LLVM_DEFINITIONS})
-    set(CLANG_LIBS libclang clangTooling ${llvm_libs})
+    set(CLANG_LIBS libclang clangTooling clangBasic clangLex ${llvm_libs})
 endif()
 
 target_link_libraries(doxygen
diff --git a/src/clangparser.cpp b/src/clangparser.cpp
index 77151d6e..2ea15ee2 100644
--- a/src/clangparser.cpp
+++ b/src/clangparser.cpp
@@ -4,6 +4,7 @@
 
 #if USE_LIBCLANG
 #include <clang-c/Index.h>
+#include "clang/Tooling/CompilationDatabase.h"
 #include "clang/Tooling/Tooling.h"
 #include <qfileinfo.h>
 #include <stdlib.h>
